home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / WMS.CAB / server_props.asp < prev    next >
Encoding:
Text File  |  2003-02-21  |  114.9 KB  |  2,577 lines

  1. ∩╗┐<%@ Language=VBScript CODEPAGE=65001 %>
  2. <!--#include file="include/wmsLocStrings.inc"-->
  3. <!--#include file="include/wmsServerHash.inc"-->
  4. <!--#include file="include/wmsPlugins.inc"-->
  5. <!--#include file="include/wmsHeader.inc"-->
  6. <!--#include file="include/wmsRefresh.inc"-->
  7. <!--#include file="include/wmsError.inc"-->
  8. <!--#include file="include/wmsToolbar.inc"-->
  9. <!--#include file="include/wmsPageBanner.inc"-->
  10. <!--#include file="include/wmsTabs.inc"-->
  11. <%
  12. '+-------------------------------------------------------------------------
  13. '
  14. '  Microsoft Windows Media
  15. '  Copyright (C) Microsoft Corporation. All rights reserved.
  16. '
  17. '  File:       Server_Props.asp
  18. '
  19. '  Contents:
  20. '
  21. '--------------------------------------------------------------------------
  22.  
  23. BeginErrorHandling
  24. ConnectToServer
  25. ClearError
  26.  
  27. Dim strCategory
  28. Dim strDecodedInstance
  29. Dim strEncodedInstance
  30. Dim bShowAllPluginCategories
  31. Dim iPluginCount
  32. Dim blnRunningOnWhistlerAdvServer
  33. Dim strSubCategory
  34. Dim iFormSelect
  35. Dim strStartOnFirstConnectChecked
  36. Dim strOP
  37. Dim objPluginCollection
  38. Dim objServerLimits
  39. Dim bPluginDisabledError
  40. Dim bPluginRemovedError
  41. Dim bPluginRemovedErrorEnable
  42. Dim bPluginRenamedError
  43. Dim bPluginDuplicateError
  44. Dim bDrawWarning
  45. Dim dwDisplayMode
  46. Dim dwNumDisplayedPlugins
  47. Dim dwSizeLimText
  48. Dim strPlayerConnections
  49. Dim strDistConnections
  50. Dim strAggPlayerBW
  51. Dim strDistAggBW
  52. Dim strPlayerBW
  53. Dim strDistBW
  54. Dim strConnectRate
  55. Dim strPlayerTOInactivity
  56. Dim strPlayerConnectACK
  57. Dim strIncomingBandwidth
  58. Dim dwNumPluginsDisplayed
  59. Dim bDriveUpdateToTreeView
  60. Dim bCheckedAnItem
  61. Dim strLeft
  62. Dim strRight
  63. Dim strError
  64.  
  65. Dim strCurrentCheckedPluginName
  66. Dim bCurSelCanBeDuplicated
  67. Dim bCurSelSupportsEnableDisable
  68. Dim bCurSelCanBeDisabled
  69. Dim bCurSelCanBeRemoved
  70. Dim bCurSelSupportsProps
  71. Dim bCurSelEnabled
  72. Dim bCurSelIsActiveScriptNoFilename
  73.  
  74. strCurrentCheckedPluginName = "plugin_?"
  75. bCurSelCanBeDuplicated = TRUE
  76. bCurSelSupportsEnableDisable = FALSE
  77. bCurSelCanBeDisabled = TRUE
  78. bCurSelCanBeRemoved = TRUE
  79. bCurSelSupportsProps = TRUE
  80. bCurSelEnabled = FALSE
  81. bCurSelIsActiveScriptNoFilename = FALSE
  82.  
  83. Const SHOWING_GENERAL = 0
  84. Const SHOWING_PLUGINS = 1
  85. Const SHOWING_LIMITS = 2
  86.  
  87. dwDisplayMode = SHOWING_PLUGINS
  88.  
  89. bDriveUpdateToTreeView = FALSE
  90. if ( 0 = StrComp( "true", RemoveDangerousCharacters( qs("s") ), vbTextCompare ) ) then
  91.     bDriveUpdateToTreeView = TRUE
  92. end if
  93.  
  94. on error resume next
  95. dwSizeLimText = CalcLenOfUnlimited
  96.  
  97. dwNumDisplayedPlugins = 0
  98. bShowAllPluginCategories = Session( "ShowAllPluginCategories" )
  99.  
  100. if( empty = g_objServer ) then
  101.     Server.Transfer( "include/server_stopped.asp" )
  102. end if
  103. on error resume next
  104. dwProductType = g_objServer.OSProductType
  105. if( 0 <> err.number ) then
  106.     blnRunningOnWhistlerAdvServer = FALSE
  107.     err.Clear
  108. else
  109.     blnRunningOnWhistlerAdvServer = CBool( WMS_OS_PRODUCT_ADVANCED and dwProductType )
  110. end if
  111. on error resume next
  112.  
  113. bPluginDisabledError = FALSE
  114. bPluginRemovedError = FALSE
  115. bPluginRemovedErrorEnable = FALSE
  116. bPluginRenamedError = FALSE
  117. bPluginDuplicateError = FALSE
  118.  
  119. rem Set the category so that we can implement a default
  120. strCategory = RemoveDangerousCharacters( qs( "category" ) )
  121. strEncodedInstance = RemoveDangerousCharacters( qs( "instance" ) )
  122. strDecodedInstance = SafeUnescape( strEncodedInstance )
  123. strPluginIndex = RemoveDangerousCharacters( qs( "pluginIndex" ) )
  124. if( 7 < Len( strPluginIndex ) ) then
  125.     dwQueryStringPluginIndex = Right( strPluginIndex, Len( strPluginIndex ) - 8 + 1 )
  126. else
  127.     dwQueryStringPluginIndex = -1
  128. end if
  129. if( "" = strCategory ) then
  130.   strCategory = CAT_GEN
  131. elseif( ( not bShowAllPluginCategories ) and ( ( L_MEDIAPARSERS_TEXT = strCategory ) or ( L_PLAYLISTPARSERS_TEXT = strCategory ) or ( L_DATASOURCE_TEXT = strCategory ) or ( L_UNICASTDATASINKS_TEXT = strCategory ) ) ) then
  132.   strCategory = CAT_GEN
  133. end if
  134.  
  135. '
  136. ' Acquire the publishing point
  137. '
  138. strSubCategory = ""
  139. iFormSelect = -1
  140.  
  141. '
  142. ' Process the category
  143. '
  144. Select Case strCategory
  145.     case CAT_GEN
  146.         iFormSelect = 0
  147.         dwDisplayMode = SHOWING_GENERAL
  148.         bCurSelCanBeDuplicated = FALSE
  149.         bCurSelSupportsEnableDisable = FALSE
  150.         bCurSelSupportsProps = FALSE
  151.     case CAT_AUTHORIZE
  152.         iFormSelect = 1
  153.         Set objPluginCollection = g_objServer.EventHandlers
  154.         strSubCategory = AUTHORIZE_SUBCAT
  155.         bCurSelSupportsEnableDisable = TRUE
  156.     case CAT_LOGGING
  157.         iFormSelect = 2
  158.         Set objPluginCollection = g_objServer.EventHandlers
  159.         strSubCategory = LOGGING_SUBCAT
  160.         bCurSelSupportsEnableDisable = TRUE
  161.     case CAT_EVENT
  162.         iFormSelect = 3
  163.         Set objPluginCollection = g_objServer.EventHandlers
  164.         bCurSelSupportsEnableDisable = TRUE
  165.     case CAT_AUTHEN
  166.         iFormSelect = 4
  167.         Set objPluginCollection = g_objServer.Authenticators
  168.         bCurSelSupportsEnableDisable = TRUE
  169.     case CAT_CACHE
  170.         if( blnRunningOnWhistlerAdvServer ) then
  171.             iFormSelect = 5
  172.         end if
  173.         Set objPluginCollection = g_objServer.CacheProxy
  174.         bCurSelSupportsEnableDisable = TRUE
  175.     case CAT_CPROT
  176.         if( blnRunningOnWhistlerAdvServer ) then
  177.             iFormSelect = 6
  178.         else
  179.             iFormSelect = 5
  180.         end if
  181.         Set objPluginCollection = g_objServer.ControlProtocols
  182.         bCurSelSupportsEnableDisable = TRUE
  183.     case CAT_LIM
  184.         if( blnRunningOnWhistlerAdvServer ) then
  185.             iFormSelect = 7
  186.         else
  187.             iFormSelect = 6
  188.         end if
  189.         dwDisplayMode = SHOWING_LIMITS
  190.         bCurSelCanBeDuplicated = FALSE
  191.         bCurSelSupportsEnableDisable = FALSE
  192.         bCurSelSupportsProps = FALSE
  193.     case CAT_MPARS
  194.         if bShowAllPluginCategories then
  195.             if( blnRunningOnWhistlerAdvServer ) then
  196.                 iFormSelect = 8
  197.             else
  198.                 iFormSelect = 7
  199.             end if
  200.             Set objPluginCollection = g_objServer.MediaParsers
  201.             bCurSelSupportsEnableDisable = TRUE
  202.         else
  203.             iFormSelect = 0
  204.             dwDisplayMode = SHOWING_GENERAL
  205.             bCurSelCanBeDuplicated = FALSE
  206.             bCurSelSupportsEnableDisable = FALSE
  207.         end if
  208.     case CAT_PLPARS
  209.         if bShowAllPluginCategories then
  210.             if( blnRunningOnWhistlerAdvServer ) then
  211.                 iFormSelect = 9
  212.             else
  213.                 iFormSelect = 8
  214.             end if
  215.             Set objPluginCollection = g_objServer.PlaylistParsers
  216.             bCurSelSupportsEnableDisable = TRUE
  217.         else
  218.             iFormSelect = 0
  219.             dwDisplayMode = SHOWING_GENERAL
  220.             bCurSelCanBeDuplicated = FALSE
  221.             bCurSelSupportsEnableDisable = FALSE
  222.         end if
  223.     case CAT_DSRC
  224.         if bShowAllPluginCategories then
  225.             if( blnRunningOnWhistlerAdvServer ) then
  226.                 iFormSelect = 10
  227.             else
  228.                 iFormSelect = 9
  229.             end if
  230.             Set objPluginCollection = g_objServer.DataSources
  231.             bCurSelSupportsEnableDisable = TRUE
  232.         else
  233.             iFormSelect = 0
  234.             dwDisplayMode = SHOWING_GENERAL
  235.             bCurSelCanBeDuplicated = FALSE
  236.             bCurSelSupportsEnableDisable = FALSE
  237.         end if
  238.     case CAT_UCAST
  239.         if bShowAllPluginCategories then
  240.             if( blnRunningOnWhistlerAdvServer ) then
  241.                 iFormSelect = 11
  242.             else
  243.                 iFormSelect = 10
  244.             end if
  245.             Set objPluginCollection = g_objServer.UnicastDataSinks
  246.             bCurSelSupportsEnableDisable = TRUE
  247.         else
  248.             iFormSelect = 0
  249.             dwDisplayMode = SHOWING_GENERAL
  250.             bCurSelCanBeDuplicated = FALSE
  251.             bCurSelSupportsEnableDisable = FALSE
  252.         end if
  253.     case Else
  254.         strCategory = CAT_GEN
  255.         iFormSelect = 0
  256.         dwDisplayMode = SHOWING_GENERAL
  257.         bCurSelCanBeDuplicated = FALSE
  258.         bCurSelSupportsEnableDisable = FALSE
  259.         bCurSelSupportsProps = FALSE
  260. End Select
  261.  
  262. '
  263. ' In the case of limits, the checkbox value is submitted with the form.  Attempting to reload
  264. '  the page for every click would lose any changes the user had made to the limits settings.
  265. '
  266. if( 0 = StrComp( "on", RemoveDangerousCharacters( qs( "ShowAllPluginCategories" ) ), vbTextCompare ) ) then
  267.     bShowAllPluginCategories = TRUE
  268.     Session( "ShowAllPluginCategories" ) = TRUE
  269.     ClearError
  270.     Response.Redirect( "server_props.asp?server=" & g_strQueryStringServer & "&category=" & strCategory & "&pluginIndex=" & strPluginIndex )
  271.     Response.Flush
  272.     Response.End
  273. elseif ( 0 = StrComp( "off", RemoveDangerousCharacters( qs("ShowAllPluginCategories") ), vbTextCompare ) ) then
  274.     bShowAllPluginCategories = FALSE
  275.     Session( "ShowAllPluginCategories" ) = FALSE
  276.     ClearError
  277.     Response.Redirect( "server_props.asp?server=" & g_strQueryStringServer & "&category=" & strCategory & "&pluginIndex=" & strPluginIndex )
  278.     Response.Flush
  279.     Response.End
  280. end if
  281.  
  282. '////////////////////////////////////////////////////////////////////////////////////////////////////
  283. if SHOWING_LIMITS = dwDisplayMode then
  284.     Err.clear
  285.     set posting = Request.Form
  286.     strOp = RemoveDangerousCharacters( trim( posting("limitOp") ) )
  287.     strSubmit = RemoveDangerousCharacters( trim( posting("submit") ) )
  288.     if( 0 < Len( strSubmit ) ) then
  289.         set objServerLimits = g_objServer.limits
  290.         
  291. '        if( 0 = StrComp( strSubmit, SafeUnescape( trim( L_APPLYBUTTON_TEXT ) ), vbTextCompare ) ) then
  292.  
  293.             strPlayerConnections = NormalizeLimitText( RemoveDangerousCharacters( posting("PlayerConnText" ) ) )
  294.             objServerLimits.ConnectedPlayers = strPlayerConnections
  295.             if( ErrorDetected( "PlayerConn" ) ) then
  296.                 ClearError
  297.             end if
  298.  
  299.             strDistConnections = NormalizeLimitText( RemoveDangerousCharacters( posting("DistConnText" ) ) )
  300.             objServerLimits.OutgoingDistributionConnections = strDistConnections
  301.             if( ErrorDetected( "DistConn" ) ) then
  302.             end if
  303.  
  304.             strAggPlayerBW = NormalizeLimitText( RemoveDangerousCharacters( posting("AggPlayerBWText" ) ) )
  305.             objServerLimits.PlayerBandwidth = strAggPlayerBW
  306.             if( ErrorDetected( "AggPlayerBW" ) ) then
  307.             end if
  308.  
  309.             strDistAggBW = NormalizeLimitText( RemoveDangerousCharacters( posting("AggDistBWText" ) ) )
  310.             objServerLimits.OutgoingDistributionBandwidth = strDistAggBW
  311.             if( ErrorDetected( "AggDistBW" ) ) then
  312.             end if
  313.  
  314.             strPlayerBW = NormalizeLimitText( RemoveDangerousCharacters( posting("PlayerBWText" ) ) )
  315.             objServerLimits.PerPlayerConnectionBandwidth = strPlayerBW
  316.             if( ErrorDetected( "PlayerBW" ) ) then
  317.             end if
  318.  
  319.             strDistBW = NormalizeLimitText( RemoveDangerousCharacters( posting("DistBWText" ) )  )
  320.             objServerLimits.PerOutgoingDistributionConnectionBandwidth = strDistBW
  321.             if( ErrorDetected( "DistBW" ) ) then
  322.             end if
  323.  
  324.             strConnectRate = RemoveDangerousCharacters( posting("ConnectRateText" ) )
  325.             strConnectRate = NormalizeLimitTextEx( CStr( strConnectRate ), CStr( DEFAULT_CONNECT_RATE ) )
  326.             objServerLimits.ConnectionRate = CLng( strConnectRate )
  327.             if( ErrorDetected( "ConnectRate" ) ) then
  328.             end if
  329.             
  330.             strPlayerTOInactivity = RemoveDangerousCharacters( posting("PlayerTimeoutText" ) )
  331.             strPlayerTOInactivity = NormalizeLimitTextEx( strPlayerTOInactivity, DEFAULT_PLAYERTIMEOUT_INSEC )
  332.             objServerLimits.PlayerInactivityTimeout = CLng( strPlayerTOInactivity )
  333.             if( ErrorDetected( "PlayerTimeout" ) ) then
  334.             end if
  335.             
  336.             strPlayerConnectACK = NormalizeLimitTextEx( RemoveDangerousCharacters( posting("ConnectACKText" ) ), DEFAULT_SERVER_CONNECTACK_INSEC )
  337.             objServerLimits.PlayerAcknowledgementTimeout = CLng( strPlayerConnectACK )
  338.             if( ErrorDetected( "ConnACK" ) ) then
  339.             end if
  340.  
  341.             strIncomingBandwidth = NormalizeLimitText( RemoveDangerousCharacters( posting( "IncomingBWText" ) ) )
  342.             objServerLimits.IncomingBandwidth = strIncomingBandwidth
  343.             if( ErrorDetected( "IncomingBW" ) ) then
  344.             end if
  345.             
  346.             Response.Redirect( "server_props.asp?server=" & g_strQueryStringServer & "&limitChangesPersisted=true&category=" & strCategory )
  347. '        end if
  348.  
  349.     end if
  350.     
  351. '////////////////////////////////////////////////////////////////////////////////////////////////////
  352. elseif ( SHOWING_PLUGINS = dwDisplayMode ) then
  353.     strOP = RemoveDangerousCharacters( trim( qs("op") ) )
  354.     if( 0 < Len( strOP ) ) then
  355.  
  356.         iPluginCount = objPluginCollection.Count
  357.  
  358.         Select Case strOp
  359.             case "enable"
  360.                 bDriveUpdateToTreeView = TRUE
  361.                 ConnectToPlugin
  362.                 ClearError
  363.                 g_objPlugin.Enabled = TRUE
  364.                 if( ErrorDetected( "Enable" ) ) then
  365.                     if( -2147014848 = Err.number ) then
  366.                         err.Description = L_PORTINUSEERROR_TEXT
  367.                         Session( "ErrorNumber" ) = err.Number
  368.                         Session( "ErrorCulprit" ) = ""
  369.                         Session( "ErrorDescription" ) = L_PORTINUSEERROR_TEXT
  370.                         break
  371.                     elseif( -2147024773 = Err.number ) then
  372.                         err.Description = L_ACTSCRIPTPLERROR_TEXT
  373.                         Session( "ErrorNumber" ) = err.Number
  374.                         Session( "ErrorCulprit" ) = ""
  375.                         Session( "ErrorDescription" ) = L_ACTSCRIPTPLERROR_TEXT
  376.                         break
  377.                     end if
  378.                 end if
  379.             case "disable"
  380.                 bDriveUpdateToTreeView = TRUE
  381.                 strError = CStr( trim( Session( "DisableError" ) ) )
  382.                 Session( "DisableError" ) = ""
  383.                 if( 0 < Len( strError ) ) then
  384.                     bPluginDisabledError = TRUE
  385.                 else
  386.                     ClearError
  387.                 end if
  388.             case "remove"
  389.                 bDriveUpdateToTreeView = TRUE
  390.                 strError = CStr( trim( Session( "RemoveError" ) ) )
  391.                 Session( "RemoveError" ) = ""
  392.                 if( 0 = Len( strError ) ) then
  393.                     ClearError
  394.                 elseif( 0 = Len( qs("prompted") ) )then
  395.                     bPluginRemovedError = TRUE
  396.                 end if
  397.             case "refresh"
  398.                 bDriveUpdateToTreeView = TRUE
  399.                 ClearError
  400.             case Else
  401.         End Select
  402.  
  403.         if ( not bPluginRemovedError ) and ( not bPluginDisabledError ) then    
  404.             if( 0 <> Err.number ) then
  405.                 ErrorDetected( "" )
  406.                 Session( "PageReloadedToDisplayError" ) = 1
  407.             else
  408.                 Response.Redirect( "server_props.asp?server=" & g_strQueryStringServer & "&category=" & strCategory & "&pluginIndex=" & strPluginIndex & "&s=true" )
  409.                 err.clear
  410.             end if
  411.         end if
  412.     end if
  413.     
  414. '////////////////////////////////////////////////////////////////////////////////////////////////////
  415. else
  416.     ' Handle General operations
  417. end if
  418.  
  419. if( SHOWING_LIMITS = dwDisplayMode ) then
  420.     set objServerLimits = g_objServer.limits
  421.     strPlayerConnections = AdjustLimitText( objServerLimits.ConnectedPlayers )
  422.     strDistConnections = AdjustLimitText( objServerLimits.OutgoingDistributionConnections )
  423.     strAggPlayerBW = AdjustLimitText( objServerLimits.PlayerBandwidth )
  424.     strDistAggBW = AdjustLimitText( objServerLimits.OutgoingDistributionBandwidth )
  425.     strPlayerBW = AdjustLimitText( objServerLimits.PerPlayerConnectionBandwidth )
  426.     strDistBW = AdjustLimitText( objServerLimits.PerOutgoingDistributionConnectionBandwidth )
  427.     
  428.     strConnectRate = AdjustLimitText( objServerLimits.ConnectionRate )
  429.     strPlayerTOInactivity = AdjustLimitText( objServerLimits.PlayerInactivityTimeout )
  430.     strPlayerConnectACK = AdjustLimitText( objServerLimits.PlayerAcknowledgementTimeout )
  431.     strIncomingBW = AdjustLimitText( objServerLimits.IncomingBandwidth )
  432. end if
  433.  
  434. '/////////////////////////////////////////////////////////////////////////////////////
  435. Function NoFilenameActiveScriptPlugin( ByRef EachPlugin )
  436.     on error resume next
  437.     
  438.     NoFilenameActiveScriptPlugin = FALSE
  439.     if( strCategory <> CAT_EVENT ) then
  440.         Exit Function
  441.     end if
  442.     
  443.     Dim pluginAdmin
  444.     Dim strScriptFilename
  445.     Set pluginAdmin = EachPlugin.CustomInterface
  446.     if( 0 = err.number ) then
  447.         strScriptFilename = pluginAdmin.FileName
  448.         if( 0 = err.number ) then
  449.             if( 0 = Len( strScriptFilename ) ) then
  450.                 NoFilenameActiveScriptPlugin = TRUE
  451.             end if
  452.         end if
  453.     end if
  454.     err.Clear
  455. End Function
  456.  
  457.  
  458. '/////////////////////////////////////////////////////////////////////////////////////
  459. Function CalcLenOfUnlimited()
  460.     Dim intLen
  461.     Dim strUnlimited
  462.  
  463.     intLen = 0
  464.     strUnlimited = L_UNLIMITED_TEXT
  465.     intLen = Len( strUnlimited )
  466.  
  467.     if( intLen < MAX_LEN_LIMIT ) then
  468.         intLen = MAX_LEN_LIMIT
  469.     end if
  470.  
  471.     CalcLenOfUnlimited = intLen
  472. end Function
  473.  
  474. '/////////////////////////////////////////////////////////////////////////////////////
  475. Sub IsDisabled( strValue )
  476.     if( 0 = StrComp( L_UNLIMITED_TEXT, strValue, vbTextCompare ) ) then
  477.         Response.Write( " disabled " )
  478.     end if
  479. end sub
  480.  
  481.  
  482. '/////////////////////////////////////////////////////////////////////////////////////
  483. Sub IsDisabledEx( strValue, strDisabled )
  484.     if( 0 = StrComp( strDisabled, strValue, vbTextCompare ) ) then
  485.         Response.Write( " disabled " )
  486.     end if
  487. end sub
  488.  
  489.  
  490. '/////////////////////////////////////////////////////////////////////////////////////
  491. Sub CheckIfNotDefault( strValue, strDefaultValue )
  492.     if( 0 <> StrComp( strValue, strDefaultValue, vbTextCompare ) ) then
  493.         Response.Write( " checked " )
  494.     end if
  495. end sub
  496.  
  497.  
  498. '/////////////////////////////////////////////////////////////////////////////////////
  499. function CalcMaxInputLength( l )
  500.     if( 0 = StrComp( L_UNLIMITED_TEXT, l, vbTextCompare ) ) then
  501.         CalcMaxInputLength = dwSizeLimText
  502.     else
  503.         CalcMaxInputLength = MAX_LEN_LIMIT
  504.     end if
  505. end function
  506.  
  507.  
  508. '/////////////////////////////////////////////////////////////////////////////////////
  509. function AdjustLimitText(l)
  510.     if -1 = l then
  511.        AdjustLimitText = L_UNLIMITED_TEXT
  512.     else
  513.         AdjustLimitText = l       
  514.     end if
  515. end function
  516.  
  517.  
  518. '/////////////////////////////////////////////////////////////////////////////////////
  519. function NormalizeLimitText( strText )
  520.     
  521.     if ( 0 = StrComp( L_UNLIMITED_TEXT, strText, vbTextCompare ) ) then
  522.         NormalizeLimitText = "-1"
  523.     else
  524.         if IsEmpty( strText ) then
  525.             NormalizeLimitText = "-1"
  526.         elseif ( 0 = Len( strText ) ) then
  527.             NormalizeLimitText = "-1"
  528.         elseif CLng( strText ) < -1 then
  529.             Err.Raise 13, "NormalizeLimitText", L_TYPEMISMATCH_TEXT
  530.             NormalizeLimitText = strText
  531.         else
  532.             if( ( CDbl( strText ) <= MAX_LIMIT_VAL ) and ( CDbl( strText ) >= 0 ) ) then
  533.                 NormalizeLimitText = strText
  534.             else
  535.                 Err.Raise 13, "NormalizeLimitText", L_TYPEMISMATCH_TEXT
  536.                 NormalizeLimitText = "-1"
  537.             end if
  538.         end if
  539.     end if
  540. end function
  541.  
  542.  
  543. '/////////////////////////////////////////////////////////////////////////////////////
  544. function NormalizeLimitTextEx( strText, strDefault )
  545.     if ( 0 = StrComp( strText, strDefault, vbTextCompare ) ) then
  546.         NormalizeLimitTextEx = strDefault
  547.     else
  548.         if IsEmpty( strText ) then
  549.             NormalizeLimitTextEx = strDefault
  550.         elseif ( 0 = Len( strText ) ) then
  551.             NormalizeLimitTextEx = strDefault
  552.         elseif ( 0 = StrComp( L_UNLIMITED_TEXT, strText, vbTextCompare ) ) then
  553.             NormalizeLimitTextEx = -1
  554.         elseif CLng( strText ) < -1 then
  555.             Err.Raise 13, "NormalizeLimitTextEx", L_TYPEMISMATCH_TEXT
  556.             NormalizeLimitTextEx = strText
  557.         else
  558.             if( ( CDbl( strText ) <= MAX_LIMIT_VAL ) and ( CDbl( strText ) >= 0 ) ) then
  559.                 NormalizeLimitTextEx = strText
  560.             else
  561.                 Err.Raise 13, "NormalizeLimitTextEx", L_TYPEMISMATCH_TEXT
  562.                 NormalizeLimitTextEx = "-1"
  563.             end if
  564.         end if
  565.     end if
  566. end function
  567.  
  568. Function CalcNumCategoriesToShow()
  569.     Dim dwOffsetForAdvancedServer
  570.     Dim dwNumCategoriesToShow
  571.     
  572.     if( blnRunningOnWhistlerAdvServer ) then
  573.         dwOffsetForAdvancedServer = 1
  574.     else
  575.         dwOffsetForAdvancedServer = 0
  576.     end if
  577.     
  578.     if bShowAllPluginCategories then 
  579.         dwNumCategories = 11
  580.     else
  581.         dwNumCategories = 7
  582.     end if
  583.     CalcNumCategoriesToShow = dwNumCategories + dwOffsetForAdvancedServer
  584. End Function
  585.  
  586. '/////////////////////////////////////////////////////////////////////////////////
  587. '/////////////////////////////////////////////////////////////////////////////////
  588. '/////////////////////////////////////////////////////////////////////////////////
  589.  
  590. WriteHTMLHeader( RemoveDangerousCharacters( g_strDecodedServerName ) )
  591. if( SHOWING_LIMITS <> dwDisplayMode ) then 
  592.        WriteRefreshMetaTag
  593. end if
  594. %>
  595. <link rel="stylesheet" type="text/css" href="<%= Session( "cssName" ) %>">
  596. <script language="JavaScript" src="include/WMSCommon.js"></script>
  597. <script language="JavaScript">
  598. <!--
  599. /*@cc_on @*/
  600. var g_szPropertiesArgs = "";
  601. var g_szCurPluginElementName; // do this server-side to overcome Mozilla upper-ascii escape() / unescape() bug
  602. var g_bCurSelCanBeDuplicated;
  603. var g_bCurSelSupportsEnableDisable;
  604. var g_bCurSelCanBeDisabled;
  605. var g_bCurSelCanBeRemoved;
  606. var g_bCurSelSupportsProperties;
  607. var g_bInError;
  608. var g_bEnabled;
  609. var g_bShowActiveScriptWarning;
  610.  
  611. var bAllowToggleShowAllPluginCategory;
  612. bAllowToggleShowAllPluginCategory = true;
  613. <% WriteCommonJSUtils %>
  614.  
  615. //////////////////////////////////////////////////////////////////////////
  616. function Init()
  617. {
  618.     SetInitialState();
  619.     DrawCurrentToolbarSelection();
  620. }
  621.  
  622. //////////////////////////////////////////////////////////////////////////
  623. function DrawCurrentToolbarSelection()
  624. {
  625.     <% jsTRY %>
  626.         DrawEnableDisable( g_bCurSelSupportsEnableDisable, g_bEnabled, g_bInError, g_bCurSelCanBeDisabled );
  627.         DrawDuplicate( g_bCurSelCanBeDuplicated && g_bCurSelCanBeDisabled );
  628.         DrawRemove( g_bCurSelCanBeRemoved && g_bCurSelCanBeDisabled );
  629.         DrawProps( g_bCurSelSupportsProperties );
  630.         g_bToolbarLoaded = true;
  631.     <% jsCATCH %>
  632. }
  633.  
  634. //////////////////////////////////////////////////////////////////////////
  635. function DrawEnableDisable( bCurSelSupportsEnableDisable, bEnabled, bInError, bCanBeDisabled )
  636. {
  637.     if( bCurSelSupportsEnableDisable )
  638.     {
  639.         EnableToolbarItem( 0, ! bEnabled || bInError );
  640.         EnableToolbarItem( 1, ( bEnabled || bInError ) && bCanBeDisabled );
  641.     }
  642.     else
  643.     {
  644.         EnableToolbarItem( 0, false );
  645.         EnableToolbarItem( 1, false );
  646.     }
  647. }
  648.  
  649. //////////////////////////////////////////////////////////////////////////
  650. function DrawRemove( bCurSelSupportsRemove )
  651. {
  652.     g_bCurSelCanBeRemoved = bCurSelSupportsRemove;
  653.     EnableToolbarItem( 2, bCurSelSupportsRemove );
  654. }
  655.  
  656. //////////////////////////////////////////////////////////////////////////
  657. function DrawDuplicate( bCurSelSupportsDuplicate )
  658. {
  659.     g_bCurSelCanBeDuplicated = bCurSelSupportsDuplicate;
  660.     EnableToolbarItem( 3, bCurSelSupportsDuplicate );
  661. }
  662.  
  663. //////////////////////////////////////////////////////////////////////////
  664. function DrawProps( bCurSelSupportsProps )
  665. {
  666.     EnableToolbarItem( 4, bCurSelSupportsProps );
  667. }
  668.  
  669. //////////////////////////////////////////////////////////////////////////
  670. function Cancel()
  671. {
  672.     document.location.replace( "server_props.asp?server=<%= g_strQueryStringServer %>&category=<%= strCategory %>&pluginIndex=" + g_szCurPluginElementName + "&instance=<%= strEncodedInstance %>" );
  673. }
  674.  
  675. //////////////////////////////////////////////////////////////////////////
  676. function IsValidEntry( theEditBox )
  677. {
  678.     var szTextEdit;
  679.     
  680.     if( theEditBox.disabled )
  681.     {
  682.         return( true );
  683.     }
  684.  
  685.     szTextEdit = new String( theEditBox.value );
  686.     
  687.     if ( ( "<%= L_UNLIMITED_TEXT %>" == szTextEdit ) && ( true == theEditBox.disabled ) )
  688.     {
  689.         return true;
  690.     }
  691.     
  692.     if( "" == szTextEdit )
  693.     {
  694.         return false;
  695.     }
  696.  
  697.     if( ! isFinite( szTextEdit ) )
  698.     {
  699.         return false;
  700.     }
  701.     
  702.     if( ( "-0" == szTextEdit ) || ( 0 > szTextEdit ) )
  703.     {
  704.         return false;
  705.     }
  706.  
  707.     if( 4294967295 <= szTextEdit )
  708.     {
  709.         return false;
  710.     }
  711.     
  712.     return true; 
  713. }
  714.  
  715. //////////////////////////////////////////////////////////////////////////
  716. function AllEntriesAreValid( bAlertUserOnError )
  717. {
  718.     var theForm;
  719.     theForm = document.forms.mainForm;
  720.  
  721.     if( IsValidEntry( theForm.PlayerConnText ) &&
  722.         IsValidEntry( theForm.DistConnText ) &&
  723.         IsValidEntry( theForm.AggPlayerBWText ) &&
  724.         IsValidEntry( theForm.AggDistBWText ) &&
  725.         IsValidEntry( theForm.PlayerBWText ) &&
  726.         IsValidEntry( theForm.DistBWText ) )
  727.     {
  728.         return true;
  729.     }
  730.     
  731.     if( bAlertUserOnError )
  732.     {
  733.         window.alert( "<%= RemoveDangerousCharacters( L_PLEASEENTERVALUES_TEXT ) %>" );
  734.     }
  735.     
  736.     return false;
  737. }
  738.  
  739. //////////////////////////////////////////////////////////////////////////
  740. function EnableButtons( bAlertUserOnError )
  741. {
  742.     var theForm;
  743.     theForm = document.forms.mainForm;
  744.  
  745.     if( AllEntriesAreValid( bAlertUserOnError ) )
  746.     {
  747.         theForm.submit.disabled = false;
  748.         theForm.cancel.disabled = false;
  749.         theForm.ShowAllPluginCategories.disabled = true;
  750.         bAllowToggleShowAllPluginCategory = false;
  751.     }
  752.     else
  753.     {
  754.         theForm.submit.disabled = true;
  755.         theForm.cancel.disabled = false;<% if SHOWING_LIMITS <> dwDisplayMode then %>
  756.         theForm.ShowAllPluginCategories.disabled = false;<% end if %>
  757.         bAllowToggleShowAllPluginCategory = true;
  758.     }
  759. }
  760.  
  761. //////////////////////////////////////////////////////////////////////////
  762. function InitLimits()
  763. {
  764.     var theCheckBox;
  765.     var theTextBox;
  766.     
  767.     theTextBox = document.mainForm.elements[ "PlayerConnText" ];
  768.     theCheckBox = document.mainForm.elements[ "PlayerConnCheckbox" ];
  769.     if( ! theCheckBox.checked )
  770.     {
  771.         if( ! document.mainForm.elements[ "PlayerConnText" ].isDisabled )
  772.         {
  773.             document.mainForm.elements[ "PlayerConnText" ].disabled = true;
  774.         }
  775.     }
  776.  
  777.     theTextBox = document.mainForm.elements[ "DistConnText" ];
  778.     theCheckBox = document.mainForm.elements[ "DistConnCheckbox" ];
  779.     if( ! theCheckBox.checked )
  780.     {
  781.         theTextBox.disabled = true;
  782.     }
  783.  
  784.     theTextBox = document.mainForm.elements[ "AggPlayerBWText" ];
  785.     theCheckBox = document.mainForm.elements[ "AggPlayerBWCheckbox" ];
  786.     if( ! theCheckBox.checked )
  787.     {
  788.         theTextBox.disabled = true;
  789.     }
  790.  
  791.     theTextBox = document.mainForm.elements[ "AggDistBWText" ];
  792.     theCheckBox = document.mainForm.elements[ "AggDistBWCheckbox" ];
  793.     if( ! theCheckBox.checked )
  794.     {
  795.         theTextBox.disabled = true;
  796.     }
  797.  
  798.     theTextBox = document.mainForm.elements[ "PlayerBWText" ];
  799.     theCheckBox = document.mainForm.elements[ "PlayerBWCheckbox" ];
  800.     if( ! theCheckBox.checked )
  801.     {
  802.         theTextBox.disabled = true;
  803.     }
  804.  
  805.     theTextBox = document.mainForm.elements[ "DistBWText" ];
  806.     theCheckBox = document.mainForm.elements[ "DistBWCheckbox" ];
  807.     if( ! theCheckBox.checked )
  808.     {
  809.         theTextBox.disabled = true;
  810.     }
  811.  
  812.     theTextBox = document.mainForm.elements[ "ConnectRateText" ];
  813.     theCheckBox = document.mainForm.elements[ "ConnectRateCheckbox" ];
  814.     if( ! theCheckBox.checked )
  815.     {
  816.         theTextBox.disabled = true;
  817.     }
  818.  
  819.     theTextBox = document.mainForm.elements[ "PlayerTimeoutText" ];
  820.     theCheckBox = document.mainForm.elements[ "PlayerTimeoutCheckbox" ];
  821.     if( ! theCheckBox.checked )
  822.     {
  823.         theTextBox.disabled = true;
  824.     }
  825.  
  826.     theTextBox = document.mainForm.elements[ "ConnectACKText" ];
  827.     theCheckBox = document.mainForm.elements[ "ConnectACKCheckbox" ];
  828.     if( ! theCheckBox.checked )
  829.     {
  830.         theTextBox.disabled = true;
  831.     }
  832. }
  833.  
  834. //////////////////////////////////////////////////////////////////////////
  835. function GetFormElementID( theElement )
  836. {
  837.     var i,dwNumElementsl
  838.     var bFound;
  839.     var eachElement;
  840.     
  841.     dwNumElements = document.mainForm.elements.length;
  842.     
  843.     bFound = false;
  844.     for( i = 0; ( i < dwNumElements ) && ( ! bFound ); i++ )
  845.     {
  846.         eachElement = document.mainForm.elements[ i ];
  847.         if( eachElement.name == theElement.name )
  848.         {
  849.             bFound = true;
  850.             break;
  851.         }
  852.     }
  853.     if( ! bFound )
  854.     {
  855.         window.alert( "??" );
  856.         return( -1 );
  857.     }
  858.  
  859.     return( i );
  860. }
  861.  
  862. //////////////////////////////////////////////////////////////////////////
  863. function CheckLimit( theCheckBox, theTextBox, szDefaultVal )
  864. {
  865.     var x;
  866.     var dwVal;
  867.     var szVal;
  868.  
  869.     x = theTextBox.value;
  870.     szVal = new String( x );
  871.     if( 0 == szVal.length )
  872.     {
  873.         theTextBox.style.color="#000000";
  874.         EnableButtons( false );
  875.         return;
  876.     }
  877.     
  878.     if ( "<%= L_UNLIMITED_TEXT %>" == szVal )
  879.     {
  880.         theCheckBox.checked = ( szDefaultVal != "<%= L_UNLIMITED_TEXT %>" );
  881.         EnableButtons( false );
  882.     }
  883.     else if( "<%= L_INVALIDLIMIT_TEXT %>" != szVal )
  884.     {
  885.         if( isNaN( theTextBox.value ) )
  886.         {
  887.             theTextBox.style.color="#ff0000";
  888.             EnableButtons( false );
  889.             return;
  890.         }
  891.         
  892.         dwVal = parseInt( szVal );
  893.         if( ! ( ( 0 <= dwVal ) && ( 0xffffffff >= dwVal ) ) )
  894.         {
  895.             theTextBox.style.color="#ff0000";
  896.             EnableButtons( false );
  897.             return;
  898.         }
  899.         else
  900.         {
  901.             var szNewVal = new String( dwVal );
  902.             if( theTextBox.value != szNewVal )
  903.             {
  904. //                theTextBox.value = dwVal;
  905.             }
  906.         }
  907.     }
  908.     
  909.     theTextBox.style.color="#000000";
  910.     EnableButtons( false );
  911. }
  912.  
  913.  
  914. //////////////////////////////////////////////////////////////////////////
  915. function ToggleCheckbox( theCheckBox, theTextBox )
  916. {
  917.     var x;
  918.     var dwVal;
  919.     var dwCheckID, dwTextID;
  920.     var theElement;
  921.     var resolvedCheckBox;
  922.  
  923.     if( ! theTextBox )
  924.     {
  925.         return( false );
  926.     }
  927.     
  928.     dwCheckID = GetFormElementID( theCheckBox );
  929.     dwTextID = GetFormElementID( theTextBox );
  930.     
  931.     resolvedCheckBox = document.mainForm.elements[ dwCheckID ];
  932.  
  933.     if( resolvedCheckBox.checked )
  934.     {
  935.         theElement = document.mainForm.elements[ dwTextID ];
  936.  
  937.         theElement.disabled = false;
  938.         theElement.value = "";
  939.         theElement.focus();
  940.     }
  941.     else
  942.     {
  943.         theElement = document.mainForm.elements[ dwTextID ];
  944.  
  945.         theElement.disabled = true;
  946.         theElement.value = "<%= L_UNLIMITED_TEXT %>";
  947.     }
  948.     
  949.     EnableButtons( false );
  950. }
  951.  
  952.  
  953. //////////////////////////////////////////////////////////////////////////
  954. function ToggleCheckboxEx( theCheckBox, theTextBox, szDefault )
  955. {
  956.     var x;
  957.     var dwVal;
  958.     var dwCheckID, dwTextID;
  959.     var theElement;
  960.     var resolvedCheckBox;
  961.  
  962.     if( ! theTextBox )
  963.     {
  964.         return( false );
  965.     }
  966.     
  967.     dwCheckID = GetFormElementID( theCheckBox );
  968.     dwTextID = GetFormElementID( theTextBox );
  969.     
  970.     resolvedCheckBox = document.mainForm.elements[ dwCheckID ];
  971.  
  972.     if( resolvedCheckBox.checked )
  973.     {
  974.         theElement = document.mainForm.elements[ dwTextID ];
  975.  
  976.         theElement.disabled = false;
  977.         theElement.value = szDefault;
  978.         theElement.focus();
  979.     }
  980.     else
  981.     {
  982.         theElement = document.mainForm.elements[ dwTextID ];
  983.  
  984.         theElement.disabled = true;
  985.         theElement.value = szDefault;
  986.     }
  987.     
  988.     EnableButtons( false );
  989. }
  990.  
  991. <% if SHOWING_LIMITS = dwDisplayMode then %>
  992. //////////////////////////////////////////////////////////////////////////
  993. function GetLimitDescription( dwWhichLimit )
  994. {
  995.     var win = null;
  996.     var bReplace = true;
  997.     var szServerName;
  998.     var szWinName;
  999.     
  1000.     szWinName = "PluginDescription";
  1001.     szUrl = "plugins/plugin_description.asp?server=<%= g_strQueryStringServer %>&limit=" + dwWhichLimit;
  1002.     
  1003.     if( ( 0 <= dwWhichLimit ) && ( dwWhichLimit <= 10 ) )
  1004.     {
  1005.     <% if( brMSIE <> g_dwBrowserType ) then %>
  1006.         var szFeatures = "resizable,scrollbars=yes,height=<%= Server.HTMLEncode( DESCRIPTIONDLGHEIGHT ) %>,width=350px<%'= DESCRIPTIONDLGWIDTH %>,outerHeight=<%= Server.HTMLEncode( DESCRIPTIONDLGHEIGHT ) %>,innerHeight=<%= Server.HTMLEncode( DESCRIPTIONDLGHEIGHT ) %>,outerWidth=<%= Server.HTMLEncode( DESCRIPTIONDLGWIDTH ) %>,innerWidth=<%= Server.HTMLEncode( DESCRIPTIONDLGWIDTH ) %>";
  1007.         win = window.open( szUrl, szWinName, szFeatures, true );
  1008.         if( ! win )
  1009.         {
  1010.             win = window.open( szUrl, szWinName, szFeatures, true );
  1011.         }
  1012.         else
  1013.         {
  1014.             win.focus();
  1015.         }
  1016.     <% else %>
  1017.         var szFeatures = "resizable:yes;status:no;help:no;scroll:yes;dialogHeight:<%= Server.HTMLEncode( DESCRIPTIONDLGHEIGHT ) %>;dialogWidth:<%= Server.HTMLEncode( DESCRIPTIONDLGWIDTH ) %>;edge:raised;center:yes";
  1018.         showModalDialog( szUrl, null, szFeatures )
  1019.     <% end if %>
  1020.     }
  1021. }
  1022.  
  1023. <% elseif ( SHOWING_PLUGINS = dwDisplayMode ) then %>
  1024.  
  1025. //////////////////////////////////////////////////////////////////////////
  1026. function GetPluginDescription( szInstance )
  1027. {
  1028.     var szInstance;
  1029.     var win = null;
  1030.     var bReplace = true;
  1031.     var szServerName;
  1032.     var szWinName;
  1033.     
  1034.     szWinName = "PluginDescription";
  1035.     
  1036.     szUrl = "plugins/plugin_description.asp?server=<%= g_strQueryStringServer%>&category=" + "<%=strCategory%>&pluginIndex=" + szInstance;
  1037.     
  1038.     if( ( null != szInstance ) && ( 0 < szInstance.length ) )
  1039.     {
  1040.     <% if( brMSIE <> g_dwBrowserType ) then %>
  1041.         var szFeatures = "resizable,scrollbars=yes,height=<%= Server.HTMLEncode( DESCRIPTIONDLGHEIGHT ) %>,width=350px<%'= DESCRIPTIONDLGWIDTH %>,outerHeight=<%= Server.HTMLEncode( DESCRIPTIONDLGHEIGHT ) %>,innerHeight=<%= Server.HTMLEncode( DESCRIPTIONDLGHEIGHT ) %>,outerWidth=<%= Server.HTMLEncode( DESCRIPTIONDLGWIDTH ) %>,innerWidth=<%= Server.HTMLEncode( DESCRIPTIONDLGWIDTH ) %>";
  1042.         win = window.open( szUrl, szWinName, szFeatures, true );
  1043.         if( ! win )
  1044.         {
  1045.             win = window.open( szUrl, szWinName, szFeatures, true );
  1046.         }
  1047.         else
  1048.         {
  1049.             win.focus();
  1050.         }
  1051.     <% else %>
  1052.         var szFeatures = "resizable:yes;status:no;help:no;scroll:yes;dialogHeight:<%= Server.HTMLEncode( DESCRIPTIONDLGHEIGHT ) %>;dialogWidth:<%= Server.HTMLEncode( DESCRIPTIONDLGWIDTH ) %>;edge:raised;center:yes";
  1053.         showModalDialog( szUrl, null, szFeatures )
  1054.     <% end if %>
  1055.     }
  1056. }
  1057.  
  1058. <% end if %>
  1059.  
  1060. //////////////////////////////////////////////////////////////////////////
  1061. function ToggleShowAllPluginCategories()
  1062. {
  1063.     if( ! bAllowToggleShowAllPluginCategory )
  1064.     {
  1065.         document.mainForm.ShowAllPluginCategories.checked = <% if bShowAllPluginCategories then %>true<%else%>false<% end if %>;
  1066.         return;
  1067.     }
  1068.     
  1069.     var szShowAll = "on";
  1070.     
  1071.     <% if bShowAllPluginCategories then %>
  1072.     szShowAll = "off";
  1073.     <% else %>
  1074.     szShowAll = "on";
  1075.     <% end if %>
  1076.     
  1077.     document.location.replace( "server_props.asp?server=" + "<%= g_strQueryStringServer %>&category=<%= strCategory %>&pluginIndex=" + g_szCurPluginElementName + "&ShowAllPluginCategories=" + szShowAll );
  1078. }
  1079.  
  1080. //////////////////////////////////////////////////////////////////////////
  1081. function HilightCurrentCat( theEvent )
  1082. {
  1083.     <% jsTRY %>
  1084. <% if( brMSIE = g_dwBrowserType ) then %>
  1085.         if( 0 == theEvent.keyCode )
  1086. <% else %>
  1087.         if( 0 == theEvent.which )            
  1088. <% end if %>
  1089.         {
  1090.             return;
  1091.         }
  1092.         
  1093.         var i = <%= Server.HTMLEncode( iFormSelect ) %>;
  1094.         document.mainForm.type[ i ].style.backgroundColor = "#6699ff";
  1095.         if( document.mainForm.type.selectedIndex != <%= Server.HTMLEncode( iFormSelect ) %> )
  1096.         {
  1097.             document.mainForm.type.style.backgroundColor = "#F5F5F5";
  1098.         }
  1099.         else
  1100.         {
  1101.             document.mainForm.type.style.backgroundColor = "#FFFFFF";
  1102.         }
  1103.     <% jsCATCH %>
  1104. }
  1105.  
  1106. //////////////////////////////////////////////////////////////////////////
  1107. function PluginTypeSelected( <% if( brMSIE <> g_dwBrowserType ) then %>event, <% end if %>bClick )
  1108. {
  1109.     <% jsTRY %>
  1110.         if( false == bClick )
  1111.         {
  1112.             // user entered a key
  1113. <% if( brMSIE = g_dwBrowserType ) then %>
  1114.             if( event.keyCode != 13 )
  1115. <% else %>
  1116.             if( event.which != 13 )            
  1117. <% end if %>
  1118.             {
  1119.                 HilightCurrentCat( event );
  1120.                 return;
  1121.             }
  1122.         }
  1123.         var i = document.mainForm.type.selectedIndex;
  1124.  
  1125.         <% 
  1126.         Dim strNewQueryString
  1127.         strNewQueryString = "server_props.asp?server=" & g_strQueryStringServer & "&category="
  1128.         %>
  1129.  
  1130.         switch( i )
  1131.         {
  1132.             case 0: //(GENERAL)
  1133.                 szNewLocation = "<%= strNewQueryString %><%= CAT_GEN %>";
  1134.                 break;
  1135.             case 1:
  1136.                 szNewLocation = "<%= strNewQueryString %><%= CAT_AUTHORIZE %>";
  1137.                 break;
  1138.             case 2:
  1139.                 szNewLocation = "<%= strNewQueryString %><%= CAT_LOGGING %>";
  1140.                 break;
  1141.             case 3:
  1142.                 szNewLocation = "<%= strNewQueryString %><%= CAT_EVENT %>";
  1143.                 break;
  1144.             case 4:
  1145.                 szNewLocation = "<%= strNewQueryString %><%= CAT_AUTHEN %>";
  1146.                 break;
  1147.     <% if blnRunningOnWhistlerAdvServer then %>
  1148.             case 5:
  1149.                 szNewLocation = "<%= strNewQueryString %><%= CAT_CACHE %>";
  1150.                 break;
  1151.             case 6:
  1152.                 szNewLocation = "<%= strNewQueryString %><%= CAT_CPROT %>"
  1153.                 break;
  1154.             case 7: //(LIMITS)
  1155.                 szNewLocation = "<%= strNewQueryString %><%= CAT_LIM %>";
  1156.                 break;
  1157.         <% if bShowAllPluginCategories then %>
  1158.             case 8:
  1159.                 szNewLocation = "<%= strNewQueryString %><%= CAT_MPARS %>";
  1160.                 break;
  1161.             case 9:
  1162.                 szNewLocation = "<%= strNewQueryString %><%= CAT_PLPARS %>";
  1163.                 break;
  1164.             case 10:
  1165.                 szNewLocation = "<%= strNewQueryString %><%= CAT_DSRC %>";
  1166.                 break;
  1167.             case 11:
  1168.                 szNewLocation = "<%= strNewQueryString %><%= CAT_UCAST %>";
  1169.                 break;
  1170.             case 12:
  1171.                 szNewLocation = "<%= strNewQueryString %><%= CAT_PLAYXFORM %>";
  1172.                 break;
  1173.             case 13:
  1174.         <% end if %>
  1175.     <% else ' Standard Server categories %>
  1176.             case 5:
  1177.                 szNewLocation = "<%= strNewQueryString %><%= CAT_CPROT %>"
  1178.                 break;
  1179.             case 6: //(LIMITS)
  1180.                 szNewLocation = "<%= strNewQueryString %><%= CAT_LIM %>";
  1181.                 break;
  1182.         <% if bShowAllPluginCategories then %>
  1183.             case 7:
  1184.                 szNewLocation = "<%= strNewQueryString %><%= CAT_MPARS %>";
  1185.                 break;
  1186.             case 8:
  1187.                 szNewLocation = "<%= strNewQueryString %><%= CAT_PLPARS %>";
  1188.                 break;
  1189.             case 9:
  1190.                 szNewLocation = "<%= strNewQueryString %><%= CAT_DSRC %>";
  1191.                 break;
  1192.             case 10:
  1193.                 szNewLocation = "<%= strNewQueryString %><%= CAT_UCAST %>";
  1194.                 break;
  1195.             case 11:
  1196.                 szNewLocation = "<%= strNewQueryString %><%= CAT_PLAYXFORM %>";
  1197.                 break;
  1198.             case 12:
  1199.         <% end if %>
  1200.     <% end if %>
  1201.             default:
  1202.                 window.alert( "<%= RemoveDangerousCharacters( L_ILLEGALSELECTION_TEXT ) %>" );
  1203.                 document.location.reload( true );
  1204.                 break;
  1205.         }
  1206.         document.location = szNewLocation;
  1207.     <% jsCATCH %>
  1208. }
  1209.  
  1210. var dwNumTimesEntered = 0;
  1211. //////////////////////////////////////////////////////////////////////////
  1212. function SetFocusToCategory( dwNumTimesSelected )
  1213. {
  1214.     <% jsTRY %>
  1215. <% if ( SHOWING_PLUGINS = dwDisplayMode ) then %>
  1216.         document.mainForm.type.focus();
  1217.         return;
  1218. <% end if %>
  1219.  
  1220. <% if( brMSIE = g_dwBrowserType ) then %>
  1221.         if( document.activeElement.tagName != "SELECT" )
  1222.         {
  1223.             document.mainForm.type.focus();
  1224.             if( dwNumTimesEntered < 3 )
  1225.             {
  1226.                 dwNumTimesEntered = dwNumTimesEntered + 1
  1227.                 setTimeout( "SetFocusToCategory( " + dwNumTimesEntered + " )", 500, "JavaScript" );
  1228.             }
  1229.             return;
  1230.         }
  1231. <% end if %>
  1232.         document.mainForm.type.focus();
  1233. <% if SHOWING_LIMITS = dwDisplayMode then %>
  1234.     InitLimits();
  1235. <% end if %>
  1236.     <% jsCATCH %>
  1237. }
  1238.  
  1239. //////////////////////////////////////////////////////////////////////////
  1240. function HilightType()
  1241. {
  1242.     <% jsTRY %>
  1243.         <%if -1 <> iFormSelect then %>
  1244.         document.mainForm.type.options[ <%=iFormSelect%> ].selected = 1
  1245.         <%end if %>
  1246.     <% jsCATCH %>
  1247. }
  1248.  
  1249. //////////////////////////////////////////////////////////////////////////
  1250. function WarnNoProps()
  1251. {
  1252.     window.alert( "<%= RemoveDangerousCharacters( L_NOPROPERTYPAGE_TEXT ) %>" );
  1253. }
  1254.  
  1255. <% if SHOWING_PLUGINS = dwDisplayMode then %>
  1256. //////////////////////////////////////////////////////////////////////////
  1257. function HandlePluginClick( dwSpecifiedPluginIndex )
  1258. {
  1259.     <% jsTRY %>
  1260.         if( ( null != dwSpecifiedPluginIndex ) && ( 0 < dwSpecifiedPluginIndex.length ) )
  1261.         {
  1262.             document.location.replace( "plugins/plugin_action.asp?server=<%= g_strQueryStringServer %>" + "&op=properties&category=" + "<%= strCategory %>" + "&pluginIndex=" + dwSpecifiedPluginIndex + g_szPropertiesArgs );
  1263.         }
  1264.         else
  1265.         {
  1266.             window.alert( " <%= RemoveDangerousCharacters( L_PLEASESELECTAPLUGIN_TEXT ) %>" );
  1267.         }
  1268.     <% jsCATCH %>
  1269. }
  1270. <% end if %>
  1271.  
  1272. //////////////////////////////////////////////////////////////////////////
  1273. function Properties()
  1274. {
  1275.     <% jsTRY %>
  1276. <% if SHOWING_PLUGINS = dwDisplayMode then %>
  1277.     <% if( brMSIE = g_dwBrowserType ) then %>
  1278.     if( ! g_bCurSelSupportsProperties )
  1279.     {
  1280.         return;
  1281.     }
  1282.     <% end if %>
  1283.     var theItem;
  1284.     theItem = document.getElementById( g_szCurPluginElementName );
  1285.     if( theItem )
  1286.     {   <% if( brMSIE <> g_dwBrowserType ) then %>
  1287.         var szPropKey = new String( theItem.getAttribute( "proppage" ) );
  1288.         if( 0 == szPropKey.length )
  1289.         {
  1290.             WarnNoProps();
  1291.         }
  1292.         else
  1293.         {
  1294.             theItem.onclick();
  1295.         }
  1296.         <% else %>
  1297.         document.getElementById( g_szCurPluginElementName ).click();
  1298.         <% end if %>
  1299.     }
  1300.     return;
  1301. <% else %>
  1302.     var szInstance;
  1303.     szInstance = new String( GetCheckedItem() );
  1304.     if( ( null != szInstance ) && ( 0 < szInstance.length ) )
  1305.     {
  1306.         var theItem;
  1307.         theItem = document.getElementById( SafeUnescape( szInstance ) );
  1308.         if( ! theItem )
  1309.         {
  1310.             szInstance = SafeUnescape( szInstance );
  1311.             theItem = document.getElementById( szInstance );
  1312.         }
  1313.         
  1314.         if( theItem ) 
  1315.         {
  1316.             document.getElementById( SafeUnescape( szInstance ) ).click();
  1317.         }
  1318.         return;
  1319.     }
  1320.     else
  1321.     {
  1322.         window.alert( " <%= RemoveDangerousCharacters( L_PLEASESELECTAPLUGIN_TEXT ) %>" );
  1323.     }
  1324. <% end if %>
  1325.     <% jsCATCH %>
  1326.  
  1327. //////////////////////////////////////////////////////////////////////////
  1328. function Refresh()
  1329. {
  1330.     <% jsTRY %>
  1331. <% if SHOWING_PLUGINS = dwDisplayMode then %>
  1332.     if( ( null != g_szCurPluginElementName ) && ( 0 < g_szCurPluginElementName.length ) )
  1333.     {
  1334.         document.location.replace( "plugins/plugin_action.asp?server=<%= g_strQueryStringServer %>&op=refresh&category=<%= strCategory %>&pluginIndex=" + g_szCurPluginElementName );
  1335.     }
  1336.     else
  1337.     {
  1338.         window.alert( "<%= RemoveDangerousCharacters( L_ERRORDESCRIPTION_TEXT ) %>" + g_szCurPluginElementName );
  1339.     }
  1340. <% else %>
  1341.     var szInstance = new String( GetCheckedItem() );
  1342.     if( ( null != szInstance ) && ( 0 < szInstance.length ) )
  1343.     {
  1344.         document.location.replace( "plugins/plugin_action.asp?server=<%= g_strQueryStringServer %>&op=refresh&category=<%= strCategory %>&instance=" + szInstance );
  1345.     }
  1346.     else
  1347.     {
  1348.         document.location.reload( true );
  1349.     }
  1350. <% end if %>
  1351.     <% jsCATCH %>
  1352.  
  1353. //////////////////////////////////////////////////////////////////////////
  1354. function ClickRadio( dwItem )
  1355. {
  1356.     <% jsTRY %>
  1357.     if( dwItem < 0 )
  1358.     {
  1359.         return;
  1360.     }
  1361.  
  1362.     //if length is defined, iterate over the elements
  1363.     if( document.mainForm.length )
  1364.     {
  1365.         e = document.mainForm.plugins[ dwItem ];
  1366.         e.checked = true;
  1367.         return;
  1368.         var i;
  1369.         var e;
  1370.         for( i = 0; i < document.mainForm.length; i++ )
  1371.         {
  1372.             e = document.mainForm.plugins[ i ];
  1373.             if ( e.checked )
  1374.             {  
  1375.                 return( SafeEscape( e.value ) );
  1376.             }   
  1377.         }
  1378.     //length isn't defined, so there's only the dummy element
  1379.     }
  1380.     <% jsCATCH %>
  1381. }
  1382.  
  1383.  
  1384. //////////////////////////////////////////////////////////////////////////
  1385. function GetCheckedItem()
  1386. {<% if( SHOWING_PLUGINS = dwDisplayMode ) then %>
  1387.     return( g_szCurPluginElementName );
  1388. <% end if %>
  1389.     return null;
  1390. }
  1391.  
  1392. <% if( SHOWING_PLUGINS = dwDisplayMode ) then %>
  1393. //////////////////////////////////////////////////////////////////////////
  1394. function Rename()
  1395. {
  1396.     <% jsTRY %>
  1397.     var szNewName;
  1398.     szNewName = "";
  1399.     
  1400.     var szInstance;
  1401.     szInstance = new String( GetCheckedItem() );
  1402.     if( ( null != szInstance ) && ( 0 < szInstance.length ) )
  1403.     {
  1404.         document.location.replace( "plugins/plugin_dialog.asp?server=<%= g_strQueryStringServer %>&op=rename&category=<%= strCategory %>&pluginIndex=" + g_szCurPluginElementName + "&instance=" + szInstance );
  1405.         return;
  1406.     }
  1407.     else
  1408.     {
  1409.         window.alert( " <%= RemoveDangerousCharacters( L_PLEASESELECTAPLUGIN_TEXT ) %>" );
  1410.     }
  1411.     <% jsCATCH %>
  1412. }
  1413. <% end if %>
  1414.  
  1415. //////////////////////////////////////////////////////////////////////////
  1416. function HandlePendingOp()
  1417. {
  1418.     <% jsTRY %>
  1419.     if( "<%= EscBackslashChar( RemoveDangerousCharacters( qs("pendingOp") ) ) %>" == "enable" )
  1420.     {
  1421.         g_bShowActiveScriptWarning = false;
  1422.         Enable();
  1423.     }
  1424.     <% jsCATCH %>
  1425. }
  1426.  
  1427. //////////////////////////////////////////////////////////////////////////
  1428. function Enable()
  1429. {
  1430.     <% jsTRY %>
  1431.     if( g_bCurSelSupportsEnableDisable && g_bEnabled && ! g_bInError )
  1432.     {
  1433.         return;
  1434.     }
  1435.  
  1436.     var szPluginIndex = -1;
  1437.     var bRedirectToProperties = false;
  1438.  
  1439.     if( g_bShowActiveScriptWarning )
  1440.     {
  1441.         bRedirectToProperties = window.confirm( "<%= RemoveDangerousCharacters( L_NOASCRIPTFILENAME_TEXT ) %>" );
  1442.     }
  1443.     if( bRedirectToProperties )
  1444.     {
  1445.         g_szPropertiesArgs = "&pendingOp=enable";
  1446.         Properties();
  1447.     }
  1448.     else
  1449.     {
  1450.         document.location.replace( "server_props.asp?server=<%= g_strQueryStringServer %>" + "&op=enable&category=<%= strCategory %>&pluginIndex=" + g_szCurPluginElementName );
  1451.     }
  1452.     <% jsCATCH %>
  1453. }
  1454.  
  1455. //////////////////////////////////////////////////////////////////////////
  1456. function Disable()
  1457. {
  1458.     <% jsTRY %>
  1459.     if( ( ! g_bCurSelSupportsEnableDisable ) || ( ! g_bCurSelCanBeDisabled ) || ( ! g_bEnabled && ! g_bInError ) )
  1460.     {
  1461.         return;
  1462.     }
  1463.     
  1464.     document.location.replace( "plugins/plugin_action.asp?server=<%= g_strQueryStringServer %>" + "&op=disable&category=<%= strCategory %>&pluginIndex=" + g_szCurPluginElementName + "&referrer=<%= Server.URLEncode("../server_props.asp") %>" );
  1465.     <% jsCATCH %>
  1466. }
  1467.  
  1468. <% if( SHOWING_PLUGINS = dwDisplayMode ) then %>
  1469. //////////////////////////////////////////////////////////////////////////
  1470. function Remove()
  1471. {
  1472.     <% jsTRY %>
  1473.     if( ! g_bCurSelCanBeRemoved )
  1474.     {
  1475.         return;
  1476.     }
  1477.  
  1478.     var szPluginIndex;
  1479.     szPluginIndex = new String( GetCheckedItem() );
  1480.     if( ( null != szPluginIndex ) && ( 0 < szPluginIndex.length ) )
  1481.     {
  1482.         document.location = "plugins/plugin_action.asp?server=<%= g_strQueryStringServer %>" + "&op=remove&category=<%= strCategory %>&pluginIndex=" + szPluginIndex;
  1483.     }
  1484.     else
  1485.     {
  1486.         window.alert( " <%= RemoveDangerousCharacters( L_PLEASESELECTAPLUGIN_TEXT ) %>" );
  1487.     }
  1488.     <% jsCATCH %>
  1489. }
  1490.  
  1491. //////////////////////////////////////////////////////////////////////////
  1492. function Duplicate()
  1493. {
  1494.     <% jsTRY %>
  1495.     if( ! g_bCurSelCanBeDuplicated )
  1496.     {
  1497.         return;
  1498.     }
  1499.  
  1500.     var szNewName = "";
  1501.     
  1502.     var szPluginIndex;
  1503.     szPluginIndex = new String( GetCheckedItem() );
  1504.     if( ( null != szPluginIndex ) && ( 0 < szPluginIndex.length ) )
  1505.     {
  1506.         document.location.replace( "plugins/plugin_dialog.asp?server=<%= g_strQueryStringServer %>&op=duplicate&category=<%= strCategory %>&pluginIndex=" + szPluginIndex );
  1507.         return;
  1508.     }
  1509.     else
  1510.     {
  1511.         window.alert( " <%= RemoveDangerousCharacters( L_PLEASESELECTAPLUGIN_TEXT ) %>" );
  1512.     }
  1513.     <% jsCATCH %>
  1514. }
  1515.  
  1516.     <% if bPluginRemovedError then %>
  1517. //////////////////////////////////////////////////////////////////////////
  1518. function HandleRemoveError()
  1519. {
  1520.     <% jsTRY %>
  1521.     var szNewQueryString;
  1522.  
  1523.     <% if bPluginRemovedErrorEnable then %>
  1524.     if( true == window.confirm( "<%= RemoveDangerousCharacters( L_LONGREMOVEPLUGINERROR_TEXT ) %>" ) )
  1525.     {
  1526.         Disable();
  1527.         return;
  1528.     }
  1529.     <% else %>
  1530.     window.alert( "<%= RemoveDangerousCharacters( L_CANNOTREMOVELASTINSTANCEOFAPLUGIN_TEXT ) %>" );
  1531.     <% end if %>
  1532.     
  1533.     szNewQueryString = "&category=<%= strCategory %>&pluginIndex=<%= strPluginIndex %>";
  1534.     document.location.replace( "server_props.asp?server=<%= g_strQueryStringServer %>" + szNewQueryString );
  1535.     <% jsCATCH %>
  1536. }
  1537.     <% elseif bPluginRenamedError then %>
  1538. //////////////////////////////////////////////////////////////////////////
  1539. function HandleRenameError()
  1540. {
  1541.     <% jsTRY %>
  1542.     var szNewQueryString;
  1543.  
  1544.     <%if 0 = Len( qs("message") ) then %>
  1545.     window.alert( "<%= RemoveDangerousCharacters( L_CANNOTRENAMEPLUGINERROR_TEXT ) & "\n" & RemoveDangerousCharacters( trim( qs("message") ) )%>" );
  1546.     <% else %>
  1547.     window.alert( "<%= RemoveDangerousCharacters( trim( qs("message") ) ) %>" );
  1548.     <% end if %>
  1549.  
  1550.     szNewQueryString = "&category=<%= strCategory %>&pluginIndex=<%= strPluginIndex %>";
  1551.     document.location.replace( "server_props.asp?server=<%= g_strQueryStringServer %>" + szNewQueryString );
  1552.     SetFocusToCategory( 0 );
  1553.     <% jsCATCH %>
  1554. }
  1555.     <% elseif bPluginDuplicateError then %>
  1556. //////////////////////////////////////////////////////////////////////////
  1557. function HandleDuplicateError()
  1558. {
  1559.     <% jsTRY %>
  1560.     var szNewQueryString;
  1561.  
  1562.     <%if 0 = Len( qs("message") ) then %>
  1563.     window.alert( "<%= RemoveDangerousCharacters( L_CANNOTDUPLICATEERROR_TEXT ) %>" );
  1564.     <% else %>
  1565.     window.alert( "<%= RemoveDangerousCharacters( RemoveDangerousCharacters( trim( qs("message") ) ) ) %>" );
  1566.     <% end if %>
  1567.  
  1568.     szNewQueryString = "&category=<%= strCategory %>&pluginIndex=<%= strPluginIndex %>";
  1569.     document.location.replace( "server_props.asp?server=<%= g_strQueryStringServer  %>" + szNewQueryString );
  1570.     SetFocusToCategory( 0 );
  1571.     <% jsCATCH %>
  1572. }
  1573.     <% end if %>
  1574. <% end if %>
  1575. -->
  1576. </script>
  1577. </head>
  1578. <% 
  1579. strPrelimOp = "SetFocusToCategory( 0 );"
  1580. if bPluginRemovedError then 
  1581.     strPrelimOp = "HandleRemoveError();"
  1582.     ClearError
  1583. elseif bPluginRenamedError then
  1584.     strPrelimOp = "HandleRenameError();"
  1585.     ClearError
  1586. elseif bPluginDuplicateError then
  1587.     strPrelimOp = "HandleDuplicateError();"
  1588.     ClearError
  1589. end if
  1590. %>
  1591. <body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0" onLoad="JavaScript:<%= strPrelimOp %><%if bDriveUpdateToTreeView then %>UpdateTreeView();<% end if %>;Init();<% if 0 < Len( "pendingOp" ) then %>HandlePendingOp();<% end if %>" oncontextmenu="JavaScript:event.cancelBubble=true;return false;">
  1592. <%
  1593. ' Draw the page banner and page tabs
  1594. DrawServerNameBanner L_PROPERTIESTABTITLE_TEXT
  1595. %>
  1596. <br>
  1597. <form name="mainForm" <% if SHOWING_LIMITS = dwDisplayMode then %>method="POST" <% end if %>>
  1598. <table bgcolor="#FFFFFF" width="100%" cellspacing="5" cellpadding="0" border="0">
  1599.     <tr>
  1600.         <td>
  1601.         <table width="100%" cellspacing="0" cellpadding="0" border="0">
  1602.         <tr>
  1603.             <td>
  1604.                 <% if SHOWING_LIMITS = dwDisplayMode then %>
  1605.                 <div class="helptext"><%= Server.HTMLEncode( L_PROPERTIESHELPSTRING_TEXT ) %></div>
  1606.                 <% elseif ( SHOWING_PLUGINS = dwDisplayMode ) then %>
  1607.                 <div class="helptext"><%= Server.HTMLEncode( L_SERVERPLUGINHELP_TEXT ) %></div>
  1608.                 <% else %>
  1609.                 <div class="helptext"><%= Server.HTMLEncode( L_SERVERGENHELP_TEXT ) %></div>
  1610.                 <% end if %>
  1611.             </td>
  1612.         </tr>
  1613.         <tr>
  1614.             <td colspan="3">
  1615.                 <div class="handcursor">
  1616.                 <br> 
  1617.                 <input type="checkbox"
  1618.                         id="ShowAllPluginCategories"
  1619.                         name="ShowAllPluginCategories" <% 
  1620.                         if( bShowAllPluginCategories ) then 
  1621.                             Response.Write( " checked " ) 
  1622.                         end if %> 
  1623.                         onClick="JavaScript:ToggleShowAllPluginCategories();"
  1624.                         tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> 
  1625.                         <%' if not ( SHOWING_PLUGINS = dwDisplayMode ) and not ( SHOWING_GENERAL = dwDisplayMode ) then Response.Write( " disabled " ) end if %>
  1626.                        >
  1627.                 <label for="ShowAllPluginCategories" class="handcursor" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> ><%= Server.HTMLEncode( L_SHOWALLPLUGINCATEGORIES_TEXT ) %></label>
  1628.                 <br> 
  1629.                 </div>
  1630.             </td>
  1631.         </tr>
  1632.         </table>
  1633.  
  1634.         <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="0"  border="0" >
  1635.         <tr valign=top>
  1636.             <td>
  1637.                 <table width="100%" cellspacing="0" cellpadding="0" border=1>
  1638.                 <tr>
  1639.                     <td>
  1640.                         <table width="100%" cellspacing="0" cellpadding="0" border="0">
  1641.                         <tr>
  1642.                             <td align="center" valign="top" bgcolor="#6699ff" class="colheadertext">
  1643.                                 <table cellspacing="1" cellpadding="1" bgcolor="#6699ff" border="0"><tr><td class="colheadertext" nowrap>
  1644.                                     <%= Server.HTMLEncode( L_CATEGORY_TEXT ) %>
  1645.                                 </td><% 
  1646.                                 if brOpera = g_dwBrowserType then %>
  1647.                                 <td>
  1648.                                 <input type="button" name="<%= Server.HTMLEncode( L_GOBUTTON_TEXT ) %>" value="<%= Server.HTMLEncode( L_GOBUTTON_TEXT ) %>" tabIndex=<%= dwTabIndex %><% dwTabIndex = dwTabIndex + 1 %> onclick="JavaScript:PluginTypeSelected( <% if( brMSIE <> g_dwBrowserType ) then %>event, <% end if %>true );" ID="Button1" NAME="Button1"></td>
  1649.                                 <% 
  1650.                                 end if %></tr></table>
  1651.                             </td>
  1652.                         </tr bgcolor="#FFFFFF" >
  1653.                         <tr>
  1654.                             <td bgcolor="#FFFFFF" align="center" width="100%" valign="top">
  1655.                                 <select name=type tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>  class="propshand" style="BACKGROUND-COLOR: #ffffff;" size=<%= CalcNumCategoriesToShow %> onClick="JavaScript:PluginTypeSelected( <% if( brMSIE <> g_dwBrowserType ) then %>event, <% end if %>true );" onKeyUp="JavaScript:PluginTypeSelected( <% if( brMSIE <> g_dwBrowserType ) then %>event, <% end if %>false );">
  1656.                                     <option value="<%= Server.HTMLEncode( CAT_GEN ) %>" <% if 0 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_GENERAL_TEXT ) %>
  1657.                                     <option value="<%= Server.HTMLEncode( CAT_AUTHORIZE ) %>" <% if 1 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_AUTHORIZERS_TEXT ) %>
  1658.                                     <option value="<%= Server.HTMLEncode( CAT_LOGGING ) %>" <% if 2 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_LOGGING_TEXT ) %>
  1659.                                     <option value="<%= Server.HTMLEncode( CAT_EVENT ) %>" <% if 3 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_EVENTSPHANDLERS_TEXT ) %>
  1660.                                     <option value="<%= Server.HTMLEncode( CAT_AUTHEN ) %>" <% if 4 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_AUTHENTICATION_TEXT ) %>
  1661.                                 <% if blnRunningOnWhistlerAdvServer then %>
  1662.                                     <option value="<%= Server.HTMLEncode( CAT_CACHE ) %>" <% if 5 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_CACHEPXMGMT_TEXT ) %>
  1663.                                     <option value="<%= Server.HTMLEncode( CAT_CPROT ) %>" <% if 6 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_CONTROLSPPROTOCOLS_TEXT ) %>
  1664.                                     <option value="<%= Server.HTMLEncode( CAT_LIM ) %>" <% if 7 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_LIMITS_TEXT ) %>
  1665.                                     <% if bShowAllPluginCategories then %>
  1666.                                     <option value="<%= Server.HTMLEncode( CAT_MPARS ) %>" <% if 8 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_MEDIASPPARSERS_TEXT ) %>
  1667.                                     <option value="<%= Server.HTMLEncode( CAT_PLPARS ) %>" <% if 9 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_PLAYLISTSPPARSERS_TEXT ) %>
  1668.                                     <option value="<%= Server.HTMLEncode( CAT_DSRC ) %>" <% if 10 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_DATASPSOURCE_TEXT ) %>
  1669.                                     <option value="<%= Server.HTMLEncode( CAT_UCAST ) %>" <% if 11 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_UNICASTSPDATASPSINKS_TEXT ) %>
  1670.                                     <% end if %>
  1671.                                 <% else %>
  1672.                                     <option value="<%= Server.HTMLEncode( CAT_CPROT ) %>" <% if 5 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_CONTROLSPPROTOCOLS_TEXT ) %>
  1673.                                     <option value="<%= Server.HTMLEncode( CAT_LIM ) %>" <% if 6 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_LIMITS_TEXT ) %>
  1674.                                     <% if bShowAllPluginCategories then %>
  1675.                                     <option value="<%= Server.HTMLEncode( CAT_MPARS ) %>" <% if 7 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_MEDIASPPARSERS_TEXT ) %>
  1676.                                     <option value="<%= Server.HTMLEncode( CAT_PLPARS ) %>" <% if 8 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_PLAYLISTSPPARSERS_TEXT ) %>
  1677.                                     <option value="<%= Server.HTMLEncode( CAT_DSRC ) %>" <% if 9 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_DATASPSOURCE_TEXT ) %>
  1678.                                     <option value="<%= Server.HTMLEncode( CAT_UCAST ) %>" <% if 10 = iFormSelect then Response.Write( "selected" ) end if %> > <%= Server.HTMLEncode( L_UNICASTSPDATASPSINKS_TEXT ) %>
  1679.                                     <% end if %>
  1680.                                 <% end if %>
  1681.                                 </select>
  1682.                             </td>
  1683.                         </tr>
  1684.                         </table>
  1685.                     </td>
  1686.                 </tr>
  1687.                 </table>
  1688.             </td>
  1689.         <td valign=top >
  1690.               
  1691.         </td>
  1692.  
  1693. <% if ( SHOWING_PLUGINS = dwDisplayMode ) then %>
  1694.         <td valign=top >
  1695.         <table width="100%" cellspacing="0" cellpadding="0" border="1" bgcolor="#FFFFFF">
  1696.         <tr>
  1697.             <td>
  1698.                 <table width="100%" cellspacing="0" cellpadding="0" border="0" cols="3">
  1699.                 <tr>
  1700.                     <td align="left" valign="top" bgcolor="#6699ff" class="colheader">
  1701.                         <table cellspacing="1" cellpadding="1" bgcolor="#6699ff" border="0"><tr><td class="colheadertext" nowrap>
  1702.                               <%= Server.HTMLEncode( L_PLUGIN_TEXT ) %>
  1703.                         </td></tr></table>
  1704.                     </td>
  1705.                     <td align="center" valign="top" bgcolor="#6699ff" class="colheader">
  1706.                         <table cellspacing="1" cellpadding="1" bgcolor="#6699ff" border="0"><tr><td class="colheadertext" nowrap>
  1707.                             <center>  <%= Server.HTMLEncode( L_STATUS_TEXT ) %>  </center>
  1708.                         </td></tr></table>
  1709.                     </td>
  1710.                     <td align="center" valign="top" bgcolor="#6699ff" class="colheader">
  1711.                         <table cellspacing="1" cellpadding="1" bgcolor="#6699ff" border="0"><tr><td class="colheadertext" nowrap>
  1712.                             <center>  <%= Server.HTMLEncode( L_DESCRIPTION_TEXT ) %>  </center>
  1713.                         </td></tr></table>
  1714.                     </td>
  1715.                 </tr>
  1716.             <%
  1717.                 on error resume next
  1718.                 Dim iPluginIndex
  1719.                 Dim strInputName, strPluginName, strMoniker, strSingleInstance
  1720.                 Dim strCurrentSubCategory
  1721.                 Dim dwPluginStatusFlags
  1722.                 Dim bRemoved
  1723.                 Dim bEnabled
  1724.                 Dim bIsWMIPlugin
  1725.                 Dim bInError
  1726.                 Dim bIsActiveScriptNoFilename
  1727.                 Dim bSingleInstance
  1728.                 Dim bSupportsPropPage
  1729.                 Dim bCannotLoadRequiresAdvServer
  1730.  
  1731.                 iPluginCount = objPluginCollection.Count
  1732.                 strPluginName = ""
  1733.                 dwNumPluginsDisplayed = 0
  1734.                 bCheckedAnItem = FALSE
  1735.                 bIsWMIPlugin = FALSE
  1736.                 iPluginIndex = 0
  1737.                 while ( iPluginIndex < iPlugincount )
  1738.                     
  1739.                     strMoniker = CStr( "" )
  1740.                     strSingleInstance = CStr( "" )
  1741.                     Set EachPlugin = objPluginCollection( iPluginIndex )
  1742.                     strCurrentSubCategory = ""
  1743.                     if( IsEmpty( EachPlugin ) ) then
  1744.                         continue
  1745.                     end if
  1746.                     strCurrentSubCategory = EachPlugin.Properties( "SubCategory" )
  1747.  
  1748.                     bIsWMIPlugin = FALSE
  1749.                     if( 0 = StrComp( CAT_EVENT, strCategory, vbTextCompare ) ) then
  1750.                         bIsWMIPlugin = ( 0 = StrComp( EachPlugin.CLSID, "{5606B770-0CA7-11D3-9043-0060089BBAF4}" ) )
  1751.                     end if
  1752.                     if( ( ( "" = strCurrentSubCategory ) and ( "" = strSubCategory ) ) or _
  1753.                         ( 0 = StrComp( strCurrentSubCategory, strSubCategory, vbTextCompare ) ) ) then
  1754.                         
  1755.                         dwNumPluginsDisplayed = dwNumPluginsDisplayed + 1
  1756.                         strPluginName = EachPlugin.Name
  1757.                         bRemoved = CBool( WMS_PLUGIN_REMOVE_ON_SERVICE_RESTART and EachPlugin.Status )
  1758.                         strMoniker = CStr( EachPlugin.Properties("ASPMoniker") )
  1759.                         bSupportsPropPage = CBool( 0 < Len( strMoniker ) )
  1760.  
  1761.                         strSingleInstance = CStr( EachPlugin.Properties( "Singleton Instance" ) )
  1762.                         bSingleInstance = CBool( ( 0 < Len( strSingleInstance ) ) and ( 0 = StrComp( "1", strSingleInstance, vbTextCompare ) ) )
  1763.                         bCannotLoadRequiresAdvServer = not blnRunningOnWhistlerAdvServer and CBool( ( WMS_PLUGIN_SUPPORT_REQUIRES_ADVANCED_SERVER = EachPlugin.SupportStatus ) )
  1764.                         dwPluginStatusFlags = EachPlugin.Status
  1765.                         bEnabled = WMS_PLUGIN_ENABLED and dwPluginStatusFlags
  1766.                         bInError = WMS_PLUGIN_ERROR and dwPluginStatusFlags
  1767.                         bIsActiveScriptNoFilename = FALSE
  1768.                         bIsActiveScriptNoFilename = NoFilenameActiveScriptPlugin( EachPlugin )
  1769.                     %>
  1770.                     <tr>
  1771.                         <td width=<%= Server.HTMLEncode( MAX_LEN_PLUGINNAME ) %> bgcolor="#FFFFFF" valign="bottom">
  1772.                             <table width="100%" cellpadding="0" cellspacing="5" bgcolor="#FFFFFF" border="0" ID="Table1">
  1773.                             <tr>
  1774.                                 <td width="100%" nowrap>
  1775.                                     <input 
  1776.                                         type="radio" 
  1777.                                         name="plugins" 
  1778.                                         id="radio_plugin_<%= iPluginIndex %>"
  1779.                                         onClick="JavaScript:g_bEnabled=<%= BoolToText( bEnabled ) %>;g_bCurSelCanBeRemoved=<%= BoolToText( not bRemoved ) %>;g_bCurSelCanBeDisabled=<%= BoolToText( not bIsWMIPlugin ) %>;g_szCurPluginElementName='plugin_<%= iPluginIndex %>';g_bCurSelCanBeDuplicated=<% if bSingleInstance then %>false<% else %>true<% end if %>;g_bCurSelSupportsProperties=<% if bSupportsPropPage then %>true<% else %>false<% end if %>;g_bInError=<%= BoolToText( bInError ) %>;g_bShowActiveScriptWarning=<%= BoolToText( bIsActiveScriptNoFilename ) %>;DrawCurrentToolbarSelection();"
  1780.                                         value="<%= strPluginName %>" 
  1781.                                         tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %><%
  1782.                                     if ( FALSE = bCheckedAnItem ) then
  1783.                                         strCurrentCheckedPluginName = "plugin_" & iPluginIndex
  1784.                                         if( ( CInt( dwQueryStringPluginIndex ) = CInt( iPluginIndex ) ) or ( CInt( iPluginCount - 1 ) = CInt( iPluginIndex ) ) ) then
  1785.                                             Response.Write( " checked ")
  1786.                                             bCurSelCanBeDuplicated = ( FALSE = bSingleInstance )
  1787.                                             bCurSelCanBeDisabled = ( not bIsWMIPlugin )
  1788.                                             bCurSelCanBeRemoved = ( not bRemoved )
  1789.                                             bCurSelSupportsProperties = bSupportsPropPage
  1790.                                             bCurSelEnabled = bEnabled
  1791.                                             bCurSelInError = bInError
  1792.                                             bCurSelIsActiveScriptNoFilename = bIsActiveScriptNoFilename
  1793.                                             bCheckedAnItem = TRUE
  1794.                                         end if
  1795.                                     end if %> >
  1796.                                     <label 
  1797.                                         for="radio_plugin_<%= iPluginIndex %>"
  1798.                                         tabIndex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  1799.                                         class="propshand<% if bRemoved or bCannotLoadRequiresAdvServer then %>disabled<% end if %>" 
  1800.                                         style="cursor:<% if bSupportsPropPage then %>hand<% else %>default<% end if %>;"
  1801.                                         id="plugin_<%= iPluginIndex %>" 
  1802.                                         name="plugin_<%= iPluginIndex %>" 
  1803.                                         tabIndex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  1804.                                         proppage="<% 
  1805.                                         if bSupportsPropPage then 
  1806.                                             Response.Write( strPluginName )
  1807.                                         end if %>" 
  1808.                                         class="propshand<% if bRemoved or bCannotLoadRequiresAdvServer then %>disabled<% end if %>" <% if not bCannotLoadRequiresAdvServer then %> 
  1809.                                         onClick="JavaScript:ClickRadio( <%= dwNumPluginsDisplayed - 1 %> );<% if bSupportsPropPage then %>HandlePluginClick( 'plugin_<%= iPluginIndex %>' );<% else %>WarnNoProps();<% end if %>g_bEnabled=<%= BoolToText( bEnabled ) %>;g_bCurSelCanBeRemoved=<%= BoolToText( not bRemoved ) %>;g_bCurSelCanBeDisabled=<%= BoolToText( not bIsWMIPlugin ) %>;g_szCurPluginElementName='plugin_<%= iPluginIndex %>';g_bCurSelCanBeDuplicated=<% if bSingleInstance then %>false<% else %>true<% end if %>;g_bCurSelSupportsProperties=<% if bSupportsPropPage then %>true<% else %>false<% end if %>;g_bInError=<%= BoolToText( bInError ) %>;g_bShowActiveScriptWarning=<%= BoolToText( bIsActiveScriptNoFilename ) %>;DrawCurrentToolbarSelection();"<% end if %>><%
  1810.                                         if( brMSIE = g_dwBrowserType ) then
  1811.                                             Response.BinaryWrite( Server.HTMLEncode( SafeUnescape( strPluginName ) )  )
  1812.                                         else
  1813.                                             Response.Write( Server.HTMLEncode( strPluginName ) )
  1814.                                         end if
  1815.                                         %></label>
  1816.                                 </td>
  1817.                             </tr>
  1818.                             </table>
  1819.                         </td>
  1820.                         <td bgcolor="#FFFFFF" nowrap class="props" align="center" valign="bottom">
  1821.                             <table width="100%" cellpadding="0" cellspacing="5" bgcolor="#FFFFFF" border="0" ID="Table6">
  1822.                             <tr>
  1823.                                 <td width="100%">
  1824.                                     <% if bCannotLoadRequiresAdvServer then %>
  1825.                                     <span class="propsdisabled"> <%= Server.HTMLEncode( L_REQADVSERVER_TEXT ) %> </span>
  1826.                                     <% elseif bRemoved then %>
  1827.                                     <span class="propsdisabled"> <%= Server.HTMLEncode( L_REMOVED_TEXT ) %> </span>
  1828.                                     <% elseif bEnabled then %>
  1829.                                     <span class="props"> <%= Server.HTMLEncode( L_ENABLED_TEXT ) %> </span>
  1830.                                     <% elseif bInError then %>
  1831.                                     <span class="props"> <%= Server.HTMLEncode( L_INERROR_TEXT ) %> </span>
  1832.                                     <% else %>
  1833.                                     <span class="props"> <%= Server.HTMLEncode( L_DISABLED_TEXT ) %> </span>
  1834.                                     <% end if %>
  1835.                                 </td>
  1836.                             </tr>
  1837.                             </table>
  1838.                         </td>
  1839.                         <td bgcolor="#FFFFFF" nowrap class="propshelp" align="center" valign="bottom">
  1840.                             <table width="100%" cellpadding="0" cellspacing="5" bgcolor="#FFFFFF" border="0" ID="Table7">
  1841.                             <tr>
  1842.                                 <td width="100%">
  1843.                                     <center>
  1844.                                     <a nowrap oncontextmenu="JavaScript:event.cancelBubble=true;return false;" class="propshelp" href="JavaScript:GetPluginDescription( 'plugin_<%= iPluginIndex %>' );" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>><%= L_DESCRIPTION_TEXT %></a>
  1845.                                     </center>
  1846.                                 </td>
  1847.                             </tr>
  1848.                             </table>
  1849.                         </td>
  1850.                     </tr>
  1851.                     <%
  1852.                     end if
  1853.                     iPluginIndex = iPluginIndex + 1     
  1854.                     %>
  1855.             <% wend %>
  1856.             <% if( 0 = dwNumPluginsDisplayed ) then %>
  1857.                     <tr>
  1858.                         <td width=<%= Server.HTMLEncode( MAX_LEN_PLUGINNAME ) %> bgcolor="#FFFFFF" >
  1859.                             <div class="small"> <%
  1860.  
  1861.                             rem Netscape won't recognize this non-break dash character and will display a question mark
  1862.                             if( brMSIE = g_dwBrowserType ) then
  1863.                                 Response.Write( SpacesToNonbreak( L_NOPLUGINS_TEXT ) ) 
  1864.                             else
  1865.                                 Response.Write( SpacesToNonbreak( Server.HTMLEncode( L_NOPLUGINSMOZILLA_TEXT ) ) )
  1866.                             end if 
  1867.                             
  1868.                             %></div>
  1869.                         </td>
  1870.                         <td bgcolor="#FFFFFF">
  1871.                              
  1872.                         </td>
  1873.                     </tr>
  1874.             <% elseif( ( not bCheckedAnItem ) and ( 1 = dwNumPluginsDisplayed ) ) then
  1875.                 strCurrentCheckedPluginName = "plugin_" & ( iPluginIndex - 1 )
  1876.                 bCurSelCanBeDuplicated = ( FALSE = bSingleInstance )
  1877.                 bCurSelCanBeDisabled = ( not bIsWMIPlugin )
  1878.                 bCurSelCanBeRemoved = ( not bRemoved )
  1879.                 bCurSelSupportsProperties = bSupportsPropPage
  1880.                 bCurSelEnabled = bEnabled
  1881.                 bCurSelInError = bInError
  1882.                 bCurSelIsActiveScriptNoFilename = bIsActiveScriptNoFilename
  1883. '                bCheckedAnItem = TRUE
  1884.         end if 
  1885.         %>
  1886.             </table>
  1887.             </td>
  1888.             </tr>
  1889.             </table>
  1890.             
  1891.         </td>
  1892. <% elseif SHOWING_GENERAL = dwDisplayMode then %>
  1893.         <td valign=top >
  1894.         <table width="100%" cellspacing="0" cellpadding="0" border="1" bgcolor="#FFFFFF">
  1895.         <tr>
  1896.             <td>
  1897.                 <table width="100%" cellspacing="0" cellpadding="0" border="0">
  1898.                 <tr>
  1899.                     <td align="left" valign="top" bgcolor="#6699ff" class="colheader">
  1900.                         <table cellspacing="1" cellpadding="1" bgcolor="#6699ff" border="0"><tr><td class="colheadertext" nowrap>
  1901.                               <%= Server.HTMLEncode( L_NAMEVALUE_TEXT ) %> 
  1902.                         </td></tr></table>
  1903.                     </td>
  1904.                     <td align="center" valign="top" bgcolor="#6699ff" class="colheader">
  1905.                         <table cellspacing="1" cellpadding="1" bgcolor="#6699ff" border="0"><tr><td class="colheadertext" nowrap>
  1906.                              <%= Server.HTMLEncode( L_VALUE_TEXT ) %> 
  1907.                         </td></tr></table>
  1908.                     </td>
  1909.                 </tr>
  1910.                 <tr>
  1911.                     <td class="props">
  1912.                          <%= Server.HTMLEncode( L_VERSIONSTR_TEXT ) %>   
  1913.                     </td>
  1914.                     <td class="props">
  1915.                          <%= Server.HTMLEncode( g_objServer.Version ) %> 
  1916.                     </td>
  1917.                 </tr>
  1918.                 </table>
  1919.             </td>
  1920.             </tr>
  1921.             </table>
  1922.             
  1923.         </td>
  1924. <% elseif SHOWING_LIMITS = dwDisplayMode then %>
  1925.         <td valign=top >
  1926.         <table width="100%" cellspacing="0" cellpadding="0" border=1>
  1927.         <tr>
  1928.             <td>
  1929.                 <table width="100%" cellspacing="0" cellpadding="0" border="0">
  1930.                 <tr>
  1931.                     <td valign=top class="colheader" colspan="2">
  1932.                         <table cellspacing="1" cellpadding="1" bgcolor="#6699ff" border="0"><tr><td class="colheadertext" nowrap>
  1933.                               <%= Server.HTMLEncode( L_LIMIT_TEXT ) %>
  1934.                         </td></tr></table>
  1935.                     </td>
  1936.                     <td align="center" valign="top" bgcolor="#6699ff" class="colheader">
  1937.                         <table cellspacing="1" cellpadding="1" bgcolor="#6699ff" border="0"><tr><td class="colheadertext" nowrap>
  1938.                             <center>  <%= Server.HTMLEncode( L_VALUE_TEXT ) %>  </center>
  1939.                         </td></tr></table>
  1940.                     </td>
  1941.                     <td align="center" valign="top" bgcolor="#6699ff" class="colheader">
  1942.                         <table cellspacing="1" cellpadding="1" bgcolor="#6699ff" border="0"><tr><td class="colheadertext" nowrap>
  1943.                             <center>  <%= Server.HTMLEncode( L_DESCRIPTION_TEXT ) %>  </center>
  1944.                         </td></tr></table>
  1945.                     </td>
  1946.                 </tr>
  1947.  
  1948. <% ' Set player connections limit %>                
  1949.                 <tr>
  1950.                     <td width="16">
  1951.                         <input type="checkbox"
  1952.                                title="<%= Server.HTMLEncode( L_CHECKBOXDESC_TEXT ) %>"
  1953.                                id="PlayerConnCheckbox"
  1954.                                name="PlayerConnCheckbox" <% CheckIfNotDefault strPlayerConnections, L_UNLIMITED_TEXT %> 
  1955.                                value=""
  1956.                                onClick="ToggleCheckbox( document.mainForm.PlayerConnCheckbox, document.mainForm.PlayerConnText );"
  1957.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> 
  1958.                                >
  1959.                     </td>
  1960.                     <td class="propshand" align="left">
  1961.                         <label for="PlayerConnCheckbox"><span nowrap><% RenderWithErrorCheck Server.HTMLEncode( L_PLAYERCONNLIMIT_TEXT ), "AggPlayerBW" %></span></label>
  1962.                     </td>
  1963.                     <td align="right">
  1964.                         <input type="text" 
  1965.                                name="PlayerConnText"
  1966.                                value="<%= Server.HTMLEncode( strPlayerConnections ) %>"
  1967.                                size=<%= dwSizeLimText %>
  1968.                                maxlength=<%= CalcMaxInputLength( strPlayerConnections ) %>
  1969.                                onChange="JavaScript:CheckLimit( document.mainForm.PlayerConnCheckbox, document.mainForm.PlayerConnText, '<%= L_UNLIMITED_TEXT %>' );"
  1970.                                onPaste="JavaScript:CheckLimit( document.mainForm.PlayerConnCheckbox, document.mainForm.PlayerConnText, '<%= L_UNLIMITED_TEXT %>' );"
  1971.                                onKeyUp="JavaScript:CheckLimit( document.mainForm.PlayerConnCheckbox, document.mainForm.PlayerConnText, '<%= L_UNLIMITED_TEXT %>' );"
  1972.                                onKeyDown="JavaScript:CheckLimit( document.mainForm.PlayerConnCheckbox, document.mainForm.PlayerConnText, '<%= L_UNLIMITED_TEXT %>' );"
  1973.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %><% IsDisabled( strPlayerConnections )%> 
  1974.                                >
  1975.                     </td>
  1976.                     <td bgcolor="#FFFFFF">
  1977.                         <div class="propshelp" align=center>
  1978.                             <center>
  1979.                             <a oncontextmenu="JavaScript:event.cancelBubble=true;return false;" class="propshelp" href="JavaScript:GetLimitDescription( 0 );" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> ><%= L_DESCRIPTION_TEXT %></a>
  1980.                             </center>
  1981.                         </div>
  1982.                     </td>
  1983.                 </tr>
  1984.  
  1985. <% ' Set outgoing distribution connections limit %>                
  1986.                 <tr>
  1987.                     <td width="16">
  1988.                         <input type="checkbox"
  1989.                                title="<%= Server.HTMLEncode( L_CHECKBOXDESC_TEXT ) %>"
  1990.                                id="DistConnCheckbox"
  1991.                                name="DistConnCheckbox" <% CheckIfNotDefault strDistConnections, L_UNLIMITED_TEXT %> 
  1992.                                value=""
  1993.                                onClick="ToggleCheckbox( document.mainForm.DistConnCheckbox, document.mainForm.DistConnText );"
  1994.                                tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> 
  1995.                                >
  1996.                     </td>
  1997.                     <td class="propshand" align="left">
  1998.                         <label for="DistConnCheckbox"><span nowrap><% RenderWithErrorCheck Server.HTMLEncode( L_DISTCONNLIMIT_TEXT ), "AggDistBW" %></span></label>
  1999.                     </td>
  2000.                     <td align="right">
  2001.                         <input type="text" 
  2002.                                name="DistConnText" 
  2003.                                value="<%= Server.HTMLEncode( strDistConnections ) %>" 
  2004.                                size=<%= dwSizeLimText %>
  2005.                                maxlength=<%= CalcMaxInputLength( strDistConnections ) %> 
  2006.                                onChange="JavaScript:CheckLimit( document.mainForm.DistConnCheckbox, document.mainForm.DistConnText, '<%= L_UNLIMITED_TEXT %>' );" 
  2007.                                onPaste="JavaScript:CheckLimit( document.mainForm.DistConnCheckbox, document.mainForm.DistConnText, '<%= L_UNLIMITED_TEXT %>' );" 
  2008.                                onKeyUp="JavaScript:CheckLimit( document.mainForm.DistConnCheckbox, document.mainForm.DistConnText, '<%= L_UNLIMITED_TEXT %>' );"
  2009.                                onKeyDown="JavaScript:CheckLimit( document.mainForm.DistConnCheckbox, document.mainForm.DistConnText, '<%= L_UNLIMITED_TEXT %>' );"
  2010.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %><% IsDisabled( strDistConnections ) %> 
  2011.                                >
  2012.                     </td>
  2013.                     <td bgcolor="#FFFFFF">
  2014.                         <div class="propshelp" align=center>
  2015.                             <center>
  2016.                             <a oncontextmenu="JavaScript:event.cancelBubble=true;return false;" class="propshelp" href="JavaScript:GetLimitDescription( 1 );" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> ><%= L_DESCRIPTION_TEXT %></a>
  2017.                             </center>
  2018.                         </div>
  2019.                     </td>
  2020.                 </tr>
  2021.  
  2022. <% ' Set aggregate player bandwidth limit (Kbps) %>
  2023.                 <tr>
  2024.                     <td width="16">
  2025.                         <input type="checkbox"
  2026.                                title="<%= Server.HTMLEncode( L_CHECKBOXDESC_TEXT ) %>"
  2027.                                id="AggPlayerBWCheckbox"
  2028.                                name="AggPlayerBWCheckbox" <% CheckIfNotDefault strAggPlayerBW, L_UNLIMITED_TEXT %> 
  2029.                                value=""
  2030.                                onClick="ToggleCheckbox( document.mainForm.AggPlayerBWCheckbox, document.mainForm.AggPlayerBWText );"
  2031.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> 
  2032.                                >
  2033.                     </td>
  2034.                     <td class="propshand" align="left">
  2035.                         <label for="AggPlayerBWCheckbox"><span nowrap><% RenderWithErrorCheck Server.HTMLEncode( L_AGGPLAYERBWLIMIT_TEXT ), "PlayerBW" %></span></label>
  2036.                     </td>
  2037.                     <td align="right">
  2038.                         <input type="text" 
  2039.                                name="AggPlayerBWText" 
  2040.                                value="<%= Server.HTMLEncode( strAggPlayerBW ) %>" 
  2041.                                size=<%= dwSizeLimText %>
  2042.                                maxlength=<%= CalcMaxInputLength( strAggPlayerBW ) %> 
  2043.                                onChange="JavaScript:CheckLimit( document.mainForm.AggPlayerBWCheckbox, document.mainForm.AggPlayerBWText, '<%= L_UNLIMITED_TEXT %>' );" 
  2044.                                onPaste="JavaScript:CheckLimit( document.mainForm.AggPlayerBWCheckbox, document.mainForm.AggPlayerBWText, '<%= L_UNLIMITED_TEXT %>' );" 
  2045.                                onKeyUp="JavaScript:CheckLimit( document.mainForm.AggPlayerBWCheckbox, document.mainForm.AggPlayerBWText, '<%= L_UNLIMITED_TEXT %>' );"
  2046.                                onKeyDown="JavaScript:CheckLimit( document.mainForm.AggPlayerBWCheckbox, document.mainForm.AggPlayerBWText, '<%= L_UNLIMITED_TEXT %>' );"
  2047.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %><% IsDisabled( strAggPlayerBW ) %> 
  2048.                                >
  2049.                     </td>
  2050.                     <td bgcolor="#FFFFFF">
  2051.                         <div class="propshelp" align=center>
  2052.                             <center>
  2053.                             <a oncontextmenu="JavaScript:event.cancelBubble=true;return false;" class="propshelp" href="JavaScript:GetLimitDescription( 2 );" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> ><%= L_DESCRIPTION_TEXT %></a>
  2054.                             </center>
  2055.                         </div>
  2056.                     </td>
  2057.                 </tr>
  2058.  
  2059. <% ' Set outgoing distribution bandwidth limit (Kbps) %>                
  2060.                 <tr>
  2061.                     <td width="16">
  2062.                         <input type="checkbox"
  2063.                                title="<%= Server.HTMLEncode( L_CHECKBOXDESC_TEXT ) %>"
  2064.                                id="AggDistBWCheckbox"
  2065.                                name="AggDistBWCheckbox" <% CheckIfNotDefault strDistAggBW, L_UNLIMITED_TEXT %> 
  2066.                                value=""
  2067.                                onClick="ToggleCheckbox( document.mainForm.AggDistBWCheckbox, document.mainForm.AggDistBWText );"
  2068.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> 
  2069.                                >
  2070.                     </td>
  2071.                     <td class="propshand" align="left">
  2072.                         <label for="AggDistBWCheckbox"><span nowrap><% RenderWithErrorCheck Server.HTMLEncode( L_DISTBWLIMIT_TEXT ), "DistBW" %></span></label>
  2073.                     </td>
  2074.                     <td align="right">
  2075.                         <input type="text" 
  2076.                                name="AggDistBWText" 
  2077.                                value="<%= Server.HTMLEncode( strDistAggBW ) %>" 
  2078.                                size=<%= dwSizeLimText %>
  2079.                                maxlength=<%= CalcMaxInputLength( strDistAggBW ) %> 
  2080.                                onChange="JavaScript:CheckLimit( document.mainForm.AggDistBWCheckbox, document.mainForm.AggDistBWText, '<%= L_UNLIMITED_TEXT %>' );" 
  2081.                                onPaste="JavaScript:CheckLimit( document.mainForm.AggDistBWCheckbox, document.mainForm.AggDistBWText, '<%= L_UNLIMITED_TEXT %>' );" 
  2082.                                onKeyUp="JavaScript:CheckLimit( document.mainForm.AggDistBWCheckbox, document.mainForm.AggDistBWText, '<%= L_UNLIMITED_TEXT %>' );"
  2083.                                onKeyDown="JavaScript:CheckLimit( document.mainForm.AggDistBWCheckbox, document.mainForm.AggDistBWText, '<%= L_UNLIMITED_TEXT %>' );"
  2084.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> <% IsDisabled( strDistAggBW ) %> 
  2085.                                >
  2086.                     </td>
  2087.                     <td bgcolor="#FFFFFF">
  2088.                         <div class="propshelp" align=center>
  2089.                             <center>
  2090.                             <a oncontextmenu="JavaScript:event.cancelBubble=true;return false;" class="propshelp" href="JavaScript:GetLimitDescription( 3 );" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> ><%= L_DESCRIPTION_TEXT %></a>
  2091.                             </center>
  2092.                         </div>
  2093.                     </td>
  2094.                 </tr>
  2095.  
  2096. <% ' Set bandwidth per stream per player limit (Kbps) %>                
  2097.                 <tr>
  2098.                     <td width="16">
  2099.                         <input type="checkbox"
  2100.                                title="<%= Server.HTMLEncode( L_CHECKBOXDESC_TEXT ) %>"
  2101.                                id="PlayerBWCheckbox"
  2102.                                name="PlayerBWCheckbox" <% CheckIfNotDefault strPlayerBW, L_UNLIMITED_TEXT %> 
  2103.                                value=""
  2104.                                onClick="ToggleCheckbox( document.mainForm.PlayerBWCheckbox, document.mainForm.PlayerBWText );"
  2105.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> 
  2106.                                >
  2107.                     </td>
  2108.                     <td class="propshand" align="left">
  2109.                         <label for="PlayerBWCheckbox"><span nowrap></span><% RenderWithErrorCheck Server.HTMLEncode( L_BWPERSTREAMPERPLAYERLIMIT_TEXT ), "PlayerBW" %></span></label>
  2110.                     </td>
  2111.                     <td align="right">
  2112.                         <input type="text" 
  2113.                                name="PlayerBWText" 
  2114.                                value="<%= Server.HTMLEncode( strPlayerBW ) %>" 
  2115.                                size=<%= dwSizeLimText %>
  2116.                                maxlength=<%= CalcMaxInputLength( strPlayerBW ) %> 
  2117.                                onChange="JavaScript:CheckLimit( document.mainForm.PlayerBWCheckbox, document.mainForm.PlayerBWText, '<%= L_UNLIMITED_TEXT %>' );" 
  2118.                                onPaste="JavaScript:CheckLimit( document.mainForm.PlayerBWCheckbox, document.mainForm.PlayerBWText, '<%= L_UNLIMITED_TEXT %>' );" 
  2119.                                onKeyUp="JavaScript:CheckLimit( document.mainForm.PlayerBWCheckbox, document.mainForm.PlayerBWText, '<%= L_UNLIMITED_TEXT %>' );"
  2120.                                onKeyDown="JavaScript:CheckLimit( document.mainForm.PlayerBWCheckbox, document.mainForm.PlayerBWText, '<%= L_UNLIMITED_TEXT %>' );"
  2121.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %><% IsDisabled( strPlayerBW ) %> 
  2122.                                >
  2123.                     </td>
  2124.                     <td bgcolor="#FFFFFF">
  2125.                         <div class="propshelp" align=center>
  2126.                             <center>
  2127.                             <a oncontextmenu="JavaScript:event.cancelBubble=true;return false;" class="propshelp" href="JavaScript:GetLimitDescription( 4 );" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>><%= L_DESCRIPTION_TEXT %></a>
  2128.                             </center>
  2129.                         </div>
  2130.                     </td>
  2131.                 </tr>
  2132.  
  2133. <% ' Set bandwidth per outgoing distribution stream (Kbps) %>                
  2134.                 <tr>
  2135.                     <td width="16">
  2136.                         <input type="checkbox"
  2137.                                title="<%= Server.HTMLEncode( L_CHECKBOXDESC_TEXT ) %>"
  2138.                                id="DistBWCheckbox"
  2139.                                name="DistBWCheckbox" <% CheckIfNotDefault strDistBW, L_UNLIMITED_TEXT %> 
  2140.                                value=""
  2141.                                onClick="ToggleCheckbox( document.mainForm.DistBWCheckbox, document.mainForm.DistBWText );"
  2142.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> 
  2143.                                >
  2144.                     </td>
  2145.                     <td class="propshand" align="left">
  2146.                         <label for="DistBWCheckbox"><span nowrap><% RenderWithErrorCheck Server.HTMLEncode( L_BWPEROUTDISTSTREAMLIMIT_TEXT ), "DistConn" %></span></label>
  2147.                     </td>
  2148.                     <td align="right">
  2149.                         <input type="text" 
  2150.                                name="DistBWText" 
  2151.                                value="<%= Server.HTMLEncode( strDistBW ) %>" 
  2152.                                size=<%= dwSizeLimText %>
  2153.                                maxlength=<%= CalcMaxInputLength( strDistBW ) %> 
  2154.                                onChange="JavaScript:CheckLimit( document.mainForm.DistBWCheckbox, document.mainForm.DistBWText, '<%= L_UNLIMITED_TEXT %>' );" 
  2155.                                onPaste="JavaScript:CheckLimit( document.mainForm.DistBWCheckbox, document.mainForm.DistBWText, '<%= L_UNLIMITED_TEXT %>' );" 
  2156.                                onKeyUp="JavaScript:CheckLimit( document.mainForm.DistBWCheckbox, document.mainForm.DistBWText, '<%= L_UNLIMITED_TEXT %>' );"
  2157.                                onKeyDown="JavaScript:CheckLimit( document.mainForm.DistBWCheckbox, document.mainForm.DistBWText, '<%= L_UNLIMITED_TEXT %>' );"
  2158.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %><% IsDisabled( strDistBW ) %> 
  2159.                                >
  2160.                     </td>
  2161.                     <td bgcolor="#FFFFFF">
  2162.                         <div class="propshelp" align=center>
  2163.                             <center>
  2164.                             <a oncontextmenu="JavaScript:event.cancelBubble=true;return false;" class="propshelp" href="JavaScript:GetLimitDescription( 5 );" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>><%= L_DESCRIPTION_TEXT %></a>
  2165.                             </center>
  2166.                         </div>
  2167.                     </td>
  2168.                 </tr>
  2169.  
  2170. <% ' Set Connection rate (per second) %>
  2171.                 <tr>
  2172.                     <td width="16">
  2173.                         <input type="checkbox"
  2174.                                title="<%= Server.HTMLEncode( L_CHECKBOXDESC_TEXT ) %>"
  2175.                                id="ConnectRateCheckbox"
  2176.                                name="ConnectRateCheckbox" <% CheckIfNotDefault strConnectRate, DEFAULT_CONNECT_RATE %> 
  2177.                                value=""
  2178.                                onClick="ToggleCheckboxEx( document.mainForm.ConnectRateCheckbox, document.mainForm.ConnectRateText, '<%= DEFAULT_CONNECT_RATE %>' );"
  2179.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> 
  2180.                                >
  2181.                     </td>
  2182.                     <td class="propshand" align="left">
  2183.                         <label for="ConnectRateCheckbox"><span nowrap></span><% RenderWithErrorCheck Server.HTMLEncode( L_SRVLIMCXNNRATE_TEXT ), "ConnectRate" %></span></label>
  2184.                     </td>
  2185.                     <td align="right">
  2186.                         <input type="text" 
  2187.                                name="ConnectRateText" 
  2188.                                value="<%= Server.HTMLEncode( strConnectRate ) %>" 
  2189.                                size=<%= dwSizeLimText %>
  2190.                                maxlength=<%= CalcMaxInputLength( strDistBW ) %> 
  2191.                                onChange="JavaScript:CheckLimit( document.mainForm.ConnectRateCheckbox, document.mainForm.ConnectRateText, '<%= DEFAULT_CONNECT_RATE %>' );" 
  2192.                                onPaste="JavaScript:CheckLimit( document.mainForm.ConnectRateCheckbox, document.mainForm.ConnectRateText, '<%= DEFAULT_CONNECT_RATE %>' );" 
  2193.                                onKeyUp="JavaScript:CheckLimit( document.mainForm.ConnectRateCheckbox, document.mainForm.ConnectRateText, '<%= DEFAULT_CONNECT_RATE %>' );"
  2194.                                onKeyDown="JavaScript:CheckLimit( document.mainForm.ConnectRateCheckbox, document.mainForm.ConnectRateText, '<%= DEFAULT_CONNECT_RATE %>' );"
  2195.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %><% IsDisabledEx strConnectRate, DEFAULT_CONNECT_RATE %> 
  2196.                                >
  2197.                     </td>
  2198.                     <td bgcolor="#FFFFFF">
  2199.                         <div class="propshelp" align=center>
  2200.                             <center>
  2201.                             <a oncontextmenu="JavaScript:event.cancelBubble=true;return false;" class="propshelp" href="JavaScript:GetLimitDescription( 6 );" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>><%= L_DESCRIPTION_TEXT %></a>
  2202.                             </center>
  2203.                         </div>
  2204.                     </td>
  2205.                 </tr>
  2206.  
  2207. <% ' Set Player timeout inactivity (seconds) %>
  2208.                 <tr>
  2209.                     <td width="16">
  2210.                         <input type="checkbox"
  2211.                                title="<%= Server.HTMLEncode( L_CHECKBOXDESC_TEXT ) %>"
  2212.                                id="PlayerTimeoutCheckbox"
  2213.                                name="PlayerTimeoutCheckbox" <% CheckIfNotDefault strPlayerTOInactivity, DEFAULT_PLAYERTIMEOUT_INSEC %> 
  2214.                                value=""
  2215.                                onClick="ToggleCheckboxEx( document.mainForm.PlayerTimeoutCheckbox, document.mainForm.PlayerTimeoutText, '<%= DEFAULT_PLAYERTIMEOUT_INSEC %>' );"
  2216.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> 
  2217.                                >
  2218.                     </td>
  2219.                     <td class="propshand" align="left">
  2220.                         <label for="PlayerTimeoutCheckbox"><span nowrap><% RenderWithErrorCheck Server.HTMLEncode( L_SRVLIMPLYRTOINA_TEXT ), "PlayerTimeout" %></span></label>
  2221.                     </td>
  2222.                     <td align="right">
  2223.                         <input type="text" 
  2224.                                name="PlayerTimeoutText" 
  2225.                                value="<%= Server.HTMLEncode( strPlayerTOInactivity ) %>" 
  2226.                                size=<%= dwSizeLimText %>
  2227.                                maxlength=<%= CalcMaxInputLength( strPlayerTOInactivity ) %> 
  2228.                                onChange="JavaScript:CheckLimit( document.mainForm.PlayerTimeoutCheckbox, document.mainForm.PlayerTimeoutText, '<%= DEFAULT_PLAYERTIMEOUT_INSEC %>' );" 
  2229.                                onPaste="JavaScript:CheckLimit( document.mainForm.PlayerTimeoutCheckbox, document.mainForm.PlayerTimeoutText, '<%= DEFAULT_PLAYERTIMEOUT_INSEC %>' );" 
  2230.                                onKeyUp="JavaScript:CheckLimit( document.mainForm.PlayerTimeoutCheckbox, document.mainForm.PlayerTimeoutText, '<%= DEFAULT_PLAYERTIMEOUT_INSEC %>' );"
  2231.                                onKeyDown="JavaScript:CheckLimit( document.mainForm.PlayerTimeoutCheckbox, document.mainForm.PlayerTimeoutText, '<%= DEFAULT_PLAYERTIMEOUT_INSEC %>' );"
  2232.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %><% IsDisabledEx strPlayerTOInactivity, DEFAULT_PLAYERTIMEOUT_INSEC %> 
  2233.                                >
  2234.                     </td>
  2235.                     <td bgcolor="#FFFFFF">
  2236.                         <div class="propshelp" align=center>
  2237.                             <center>
  2238.                             <a oncontextmenu="JavaScript:event.cancelBubble=true;return false;" class="propshelp" href="JavaScript:GetLimitDescription( 7 );" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>><%= L_DESCRIPTION_TEXT %></a>
  2239.                             </center>
  2240.                         </div>
  2241.                     </td>
  2242.                 </tr>
  2243.  
  2244. <% ' Set Connection rate (per second) %>
  2245.                 <tr>
  2246.                     <td width="16">
  2247.                         <input type="checkbox"
  2248.                                title="<%= Server.HTMLEncode( L_CHECKBOXDESC_TEXT ) %>"
  2249.                                id="ConnectACKCheckbox"
  2250.                                name="ConnectACKCheckbox" <% CheckIfNotDefault strPlayerConnectACK, DEFAULT_SERVER_CONNECTACK_INSEC %> 
  2251.                                value=""
  2252.                                onClick="ToggleCheckboxEx( document.mainForm.ConnectACKCheckbox, document.mainForm.ConnectACKText, '<%= Server.HTMLEncode( DEFAULT_SERVER_CONNECTACK_INSEC ) %>' );"
  2253.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> 
  2254.                                >
  2255.                     </td>
  2256.                     <td class="propshand" align="left">
  2257.                         <label for="ConnectACKCheckbox"><span nowrap><% RenderWithErrorCheck Server.HTMLEncode( L_SRVLIMNXNACKTO_TEXT ), "ConnACK" %></span></label>
  2258.                     </td>
  2259.                     <td align="right">
  2260.                         <input type="text" 
  2261.                                name="ConnectACKText" 
  2262.                                value="<%= Server.HTMLEncode( strPlayerConnectACK ) %>" 
  2263.                                size=<%= dwSizeLimText %>
  2264.                                maxlength=<%= CalcMaxInputLength( strPlayerConnectACK ) %> 
  2265.                                onChange="JavaScript:CheckLimit( document.mainForm.ConnectACKCheckbox, document.mainForm.ConnectACKText, '<%= Server.HTMLEncode( DEFAULT_SERVER_CONNECTACK_INSEC ) %>' );" 
  2266.                                onPaste="JavaScript:CheckLimit( document.mainForm.ConnectACKCheckbox, document.mainForm.ConnectACKText, '<%= Server.HTMLEncode( DEFAULT_SERVER_CONNECTACK_INSEC ) %>' );" 
  2267.                                onKeyUp="JavaScript:CheckLimit( document.mainForm.ConnectACKCheckbox, document.mainForm.ConnectACKText, '<%= Server.HTMLEncode( DEFAULT_SERVER_CONNECTACK_INSEC ) %>' );"
  2268.                                onKeyDown="JavaScript:CheckLimit( document.mainForm.ConnectACKCheckbox, document.mainForm.ConnectACKText, '<%= Server.HTMLEncode( DEFAULT_SERVER_CONNECTACK_INSEC ) %>' );"
  2269.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> <% IsDisabledEx strPlayerConnectACK, DEFAULT_SERVER_CONNECTACK_INSEC %> 
  2270.                                >
  2271.                     </td>
  2272.                     <td bgcolor="#FFFFFF">
  2273.                         <div class="propshelp" align=center>
  2274.                             <center>
  2275.                             <a oncontextmenu="JavaScript:event.cancelBubble=true;return false;" class="propshelp" href="JavaScript:GetLimitDescription( 8 );" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>><%= L_DESCRIPTION_TEXT %></a>
  2276.                             </center>
  2277.                         </div>
  2278.                     </td>
  2279.                 </tr>
  2280.  
  2281. <% ' Set Incoming Bandwidth (Kbps) %>
  2282.                 <tr>
  2283.                     <td width="16">
  2284.                         <input type="checkbox"
  2285.                                title="<%= Server.HTMLEncode( L_CHECKBOXDESC_TEXT ) %>"
  2286.                                id="IncomingBWCheckbox"
  2287.                                name="IncomingBWCheckbox" <% CheckIfNotDefault strIncomingBW, L_UNLIMITED_TEXT %> 
  2288.                                value=""
  2289.                                onClick="ToggleCheckbox( document.mainForm.IncomingBWCheckbox, document.mainForm.IncomingBWText );"
  2290.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> 
  2291.                                >
  2292.                     </td>
  2293.                     <td class="propshand" align="left">
  2294.                         <label for="IncomingBWCheckbox"><span nowrap><% RenderWithErrorCheck Server.HTMLEncode( L_SRVINCOMINGBW_TEXT ), "IncomingBW" %></span></label>
  2295.                     </td>
  2296.                     <td align="right">
  2297.                         <input type="text" 
  2298.                                name="IncomingBWText" 
  2299.                                value="<%= Server.HTMLEncode( strIncomingBW ) %>" 
  2300.                                size=<%= dwSizeLimText %>
  2301.                                maxlength=<%= CalcMaxInputLength( strIncomingBW ) %> 
  2302.                                onChange="JavaScript:CheckLimit( document.mainForm.IncomingBWCheckbox, document.mainForm.IncomingBWText, '<%= L_UNLIMITED_TEXT %>' );" 
  2303.                                onPaste="JavaScript:CheckLimit( document.mainForm.IncomingBWCheckbox, document.mainForm.IncomingBWText, '<%= L_UNLIMITED_TEXT %>' );" 
  2304.                                onKeyUp="JavaScript:CheckLimit( document.mainForm.IncomingBWCheckbox, document.mainForm.IncomingBWText, '<%= L_UNLIMITED_TEXT %>' );"
  2305.                                onKeyDown="JavaScript:CheckLimit( document.mainForm.IncomingBWCheckbox, document.mainForm.IncomingBWText, '<%= L_UNLIMITED_TEXT %>' );"
  2306.                                tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %><% IsDisabled( strIncomingBW ) %> 
  2307.                                >
  2308.                     </td>
  2309.                     <td bgcolor="#FFFFFF">
  2310.                         <div class="propshelp" align=center>
  2311.                             <center>
  2312.                             <a oncontextmenu="JavaScript:event.cancelBubble=true;return false;" class="propshelp" href="JavaScript:GetLimitDescription( 10 );" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>><%= L_DESCRIPTION_TEXT %></a>
  2313.                             </center>
  2314.                         </div>
  2315.                     </td>
  2316.                 </tr>
  2317.                 
  2318.                 <tr>
  2319.                     <td colspan="3">
  2320.                         <table width="100%" border="1" cellspacing="0" cellpadding="0">
  2321.                         <tr>
  2322.                             <td>
  2323.                                 <table width="100%" border="0" cellspacing="4" cellpadding="0">
  2324.                                 <tr>
  2325.                                     <td width="40%" align="right">
  2326.                                         <input type="submit" name="submit" action="<%= RemoveDangerousCharacters( g_strQueryString ) & "&limitOp=submit" %>" value="<%= Server.HTMLEncode( L_APPLYBUTTON_TEXT ) %>" tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %>  disabled >
  2327.                                         <input type="button" name="cancel" value="<%= Server.HTMLEncode( L_CANCELBUTTONSPACED_TEXT ) %>" Onclick="JavaScript:Cancel();" tabindex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> disabled>
  2328.                                             
  2329.                                     </td>
  2330.                                 </tr>
  2331.                                 </table>
  2332.                             </td>
  2333.                         </tr>
  2334.                         </table>
  2335.                     </td>
  2336.                 </tr>   
  2337.                 </table>
  2338.             </td>
  2339.         </tr>
  2340.         </table>            
  2341.         </td>
  2342. <% end if %>
  2343.         </table>
  2344.         <!-- Dummy element -->
  2345.         <input type="hidden" name="server" value="<%= g_strQueryStringServer %>">
  2346.         <input type="hidden" name="category" value="<%= strCategory %>">
  2347.         <% if( SHOWING_LIMITS <> dwDisplayMode ) then %>
  2348.         <input type="hidden" name="instance" value="<%= strEncodedInstance %>">
  2349.         <% end if %>
  2350.         <input type="hidden" name="plugins" value=" ">
  2351.         <input type="hidden" name="pluginIndex" value="<% 
  2352.         if( 0 < Len( strCurrentCheckedPluginName ) ) then 
  2353.             Response.Write( strCurrentCheckedPluginName ) 
  2354.         else 
  2355.             Response.Write( strPluginIndex )
  2356.         end if %>">
  2357.         <% if( SHOWING_LIMITS = dwDisplayMode ) then %>
  2358.         <input type="hidden" name="limits" value=" ">
  2359.         <% end if %>
  2360.         </td>
  2361.     </tr>
  2362.     <tr>
  2363.         <td>
  2364.             <%
  2365. if ( SHOWING_LIMITS = dwDisplayMode ) or _
  2366.    ( SHOWING_GENERAL = dwDisplayMode ) or _
  2367.    ( ( SHOWING_PLUGINS = dwDisplayMode ) and ( 0 = dwNumPluginsDisplayed ) ) then
  2368.             ToolbarButtonText ( 0 ) = L_BUTTONENABLE_TEXT
  2369.             ToolbarButtonImage( 0 ) = IMAGE_ENABLEG
  2370.             ToolbarButtonImageDisabled( 0 ) = IMAGE_ENABLEG
  2371.             ToolbarButtonLink ( 0 ) = ""
  2372.             if( SHOWING_PLUGINS = dwDisplayMode ) then
  2373.                 ToolbarButtonAltText( 0 ) = L_ENABLEPLUGTT_TEXT
  2374.             else
  2375.                 ToolbarButtonAltText( 0 ) = L_ENABLEPLUG_TEXT
  2376.             end if
  2377.  
  2378.             ToolbarButtonText ( 1 ) = L_BUTTONDISABLE_TEXT
  2379.             ToolbarButtonImage( 1 ) = IMAGE_DISABLEG
  2380.             ToolbarButtonImageDisabled( 1 ) = IMAGE_DISABLEG
  2381.             ToolbarButtonLink ( 1 ) = ""
  2382.             if( SHOWING_PLUGINS = dwDisplayMode ) then
  2383.                 ToolbarButtonAltText( 1 ) = L_DISABLEPLUGTT_TEXT
  2384.             else
  2385.                 ToolbarButtonAltText( 1 ) = L_DISABLEPLUG_TEXT
  2386.             end if
  2387.  
  2388.             ToolbarButtonText ( 2 ) = L_BUTTONREMOVE_TEXT
  2389.             ToolbarButtonImage( 2 ) = IMAGE_REMOVEG
  2390.             ToolbarButtonLink ( 2 ) = ""
  2391.             ToolbarButtonAltText( 2 ) = L_REMOVEPLUG_TEXT
  2392.  
  2393.             ToolbarButtonText ( 3 ) = L_BUTTONDUPLICATE_TEXT
  2394.             ToolbarButtonImage( 3 ) = IMAGE_PLUGINDUPLICATEG
  2395.             ToolbarButtonLink ( 3 ) = ""
  2396.             ToolbarButtonAltText( 3 ) = L_DUPPLUG_TEXT
  2397.  
  2398.             ToolbarButtonText ( 4 ) = L_BUTTONPROPERTIES_TEXT
  2399.             ToolbarButtonImage( 4 ) = IMAGE_PROPERTIESG
  2400.             ToolbarButtonLink ( 4 ) = ""
  2401.             ToolbarButtonAltText( 4 ) = L_VIEWPROPS_TEXT
  2402.  
  2403.             ToolbarButtonText ( 5 ) = L_BUTTONRENAME_TEXT
  2404.             ToolbarButtonImage( 5 ) = IMAGE_RENAMEG
  2405.             ToolbarButtonLink ( 5 ) = ""
  2406.             ToolbarButtonAltText( 5 ) = L_RENAMEPLUG_TEXT
  2407.  
  2408. else
  2409.             ToolbarButtonText ( 0 ) = L_BUTTONENABLE_TEXT
  2410.             ToolbarButtonImage( 0 ) = IMAGE_ENABLE
  2411.             ToolbarButtonImageDisabled( 0 ) = IMAGE_ENABLEG
  2412.             ToolbarButtonLink ( 0 ) = "Javascript:Enable();"
  2413.             if( SHOWING_PLUGINS = dwDisplayMode ) then
  2414.                 ToolbarButtonAltText( 0 ) = L_ENABLEPLUGTT_TEXT
  2415.             else
  2416.                 ToolbarButtonAltText( 0 ) = L_ENABLEPLUG_TEXT
  2417.             end if
  2418.  
  2419.             ToolbarButtonText ( 1 ) = L_BUTTONDISABLE_TEXT
  2420.             ToolbarButtonImage( 1 ) = IMAGE_DISABLE
  2421.             ToolbarButtonImageDisabled( 1 ) = IMAGE_DISABLEG
  2422.             ToolbarButtonLink ( 1 ) = "Javascript:Disable();"
  2423.             if( SHOWING_PLUGINS = dwDisplayMode ) then
  2424.                 ToolbarButtonAltText( 1 ) = L_DISABLEPLUGTT_TEXT
  2425.             else
  2426.                 ToolbarButtonAltText( 1 ) = L_DISABLEPLUG_TEXT
  2427.             end if
  2428.  
  2429.             ToolbarButtonText ( 2 ) = L_BUTTONREMOVE_TEXT
  2430.             ToolbarButtonImage( 2 ) = IMAGE_REMOVE
  2431.             ToolbarButtonImageDisabled( 2 ) = IMAGE_REMOVEG
  2432.             ToolbarButtonLink ( 2 ) = "Javascript:Remove();"
  2433.             ToolbarButtonAltText( 2 ) = L_REMOVEPLUG_TEXT
  2434.  
  2435.             ToolbarButtonText ( 3 ) = L_BUTTONDUPLICATE_TEXT
  2436.             ToolbarButtonImage( 3 ) = IMAGE_PLUGINDUPLICATE
  2437.             ToolbarButtonImageDisabled( 3 ) = IMAGE_PLUGINDUPLICATEG
  2438.             ToolbarButtonLink ( 3 ) = "Javascript:Duplicate();"
  2439.             ToolbarButtonAltText( 3 ) = L_DUPPLUG_TEXT
  2440.  
  2441.             ToolbarButtonText ( 4 ) = L_BUTTONPROPERTIES_TEXT
  2442.             ToolbarButtonImage( 4 ) = IMAGE_PROPERTIES
  2443.             ToolbarButtonImageDisabled( 4 ) = IMAGE_PROPERTIESG
  2444.             ToolbarButtonLink ( 4 ) = "Javascript:Properties();"
  2445.             ToolbarButtonAltText( 4 ) = L_VIEWPROPS_TEXT
  2446.  
  2447.             ToolbarButtonText ( 5 ) = L_BUTTONRENAME_TEXT
  2448.             ToolbarButtonImage( 5 ) = IMAGE_RENAME
  2449.             ToolbarButtonLink ( 5 ) = "Javascript:Rename();"
  2450.             ToolbarButtonAltText( 5 ) = L_RENAMEPLUG_TEXT
  2451. end if
  2452.     Dim dwLastButton
  2453.     dwLastButton = 5
  2454.     if( SHOWING_PLUGINS = dwDisplayMode ) then
  2455.             ToolbarButtonText ( 6 ) = L_BUTTONREFRESH_TEXT
  2456.             ToolbarButtonImage( 6 ) = IMAGE_REFRESH
  2457.             ToolbarButtonLink ( 6 ) = "JavaScript:Refresh();"
  2458.             ToolbarButtonAltText( 6 ) = L_BUTTONREFRESHLIST_TEXT
  2459.             dwLastButton = 6
  2460.     end if
  2461.     if( Session( "ShowServerList" ) ) then
  2462.             dwLastButton = dwLastButton + 1
  2463.             ToolbarButtonText ( dwLastButton ) = L_BUTTONRETURNTOSERVERLIST_TEXT
  2464.             ToolbarButtonImage( dwLastButton ) = IMAGE_SERVERLIST
  2465.             ToolbarButtonLink ( dwLastButton ) = SERVERSLIST_PATH
  2466.             ToolbarButtonAltText( dwLastButton ) = L_RETURNTOSL_TEXT
  2467.     end if
  2468.             dwLastButton = dwLastButton + 1
  2469.             ToolbarButtonText ( dwLastButton ) = L_BUTTONHELP_TEXT
  2470.             ToolbarButtonImage( dwLastButton ) = IMAGE_HELP
  2471.             ToolbarButtonLink ( dwLastButton ) = HELPTOKEN
  2472.             ToolbarButtonAltText( dwlastButton ) = L_HELPALT_TEXT
  2473.             ToolbarHelpURL = H_SERVERPLUGINSHELPTOPIC
  2474.             ToolbarNesting = H_SERVERLEVEL
  2475.             %>
  2476. <% DrawToolbar TRUE, ( dwlastButton + 1 )  %>
  2477.           </td>
  2478.         </tr>
  2479.         </table>
  2480.         <!-- END TOOLBAR -->
  2481.     </td>
  2482.  
  2483. </tr>
  2484. </table>
  2485. </form>
  2486. <% 
  2487. if ( SHOWING_LIMITS <> dwDisplayMode ) then
  2488.     DrawRefreshControl FALSE
  2489. end if
  2490. DrawCopyrightInfo
  2491. DrawStdFooter
  2492. if( Session( "ErrorNumber" ) <> 0 ) then
  2493. %>
  2494. <script language="JavaScript">
  2495.     UpdateTreeView();
  2496. </script>
  2497. <%
  2498. end if
  2499.  
  2500. AlertUserWithPopupErrorDialog 
  2501.  
  2502. if ( 0 = StrComp( "nopluginui", RemoveDangerousCharacters( qs("err") ), vbTextCompare ) ) then
  2503. %>
  2504. <script language="JavaScript">
  2505.     window.alert( "<%= RemoveDangerousCharacters( L_NOPROPERTYPAGE_TEXT ) %>" );
  2506.     document.location.replace( "<%= Request.ServerVariables( "PATH_INFO" ) & "?server=" & g_strQueryStringServer & "&category=" & strCategory & "&instance=" & SafeEscape( strEncodedInstance ) %>" );
  2507. </script><%
  2508. end if
  2509.  
  2510. if( bPluginDisabledError ) then
  2511.     Session( "PageReloadedToDisplayError" ) = 1
  2512.     err.number = CDbl( strError )
  2513.     err.Description = Session( "ErrDisablePluginDesc" )
  2514.     Session( "ErrDisablePluginDesc" ) = ""
  2515.     ErrorDetected( "disable" )
  2516. end if
  2517.  
  2518. if ( SHOWING_PLUGINS = dwDisplayMode ) and ( "enable" = RemoveDangerousCharacters( qs("op") ) ) and ( Session( "ErrorNumber" ) <> 0 ) then
  2519.     %><script language="JavaScript">
  2520.         document.location.replace( "server_props.asp?server=<%=g_strQueryStringServer%>&category=<%= strCategory %>&pluginIndex=<%= strPluginIndex %>" );
  2521.       </script>
  2522.     <%
  2523. else
  2524.     OnErrorGoBack 
  2525. end if
  2526.  
  2527. if( bPluginDisabledError ) then
  2528.     ClearError
  2529. end if
  2530. if Session( "ErrorNumber" ) <> 0 then        
  2531. %>
  2532. <script language="JavaScript">
  2533.     document.location.replace( "<%= Request.ServerVariables( "PATH_INFO" ) & "?server=" & g_strQueryStringServer & "&category=" & strCategory & "&instance=" & strEncodedInstance & "&pluginIndex=" & strPluginIndex %>" );
  2534. </script>
  2535. <%
  2536. end if 
  2537. %>
  2538. </body>
  2539. <script language="JavaScript">
  2540. //////////////////////////////////////////////////////////////////////////
  2541. function SetInitialState()
  2542. {
  2543.     g_szCurPluginElementName = new String( "<%= strCurrentCheckedPluginName %>" );
  2544.     g_bCurSelCanBeDuplicated = <%= BoolToText( bCurSelCanBeDuplicated ) %>;
  2545.     g_bCurSelSupportsEnableDisable = <%= BoolToText( bCurSelSupportsEnableDisable ) %>;
  2546.     g_bCurSelCanBeDisabled = <%= BoolToText( bCurSelCanBeDisabled ) %>;
  2547.     g_bCurSelCanBeRemoved = <%= BoolToText( bCurSelCanBeRemoved ) %>;
  2548.     g_bCurSelSupportsProperties = <%= BoolToText( bCurSelSupportsProperties ) %>;
  2549.     g_bInError = <%= BoolToText( bCurSelInError ) %>;
  2550.     g_bEnabled = <%= BoolToText( bCurSelEnabled ) %>;
  2551.     g_bShowActiveScriptWarning = <%= BoolToText( bCurSelIsActiveScriptNoFilename ) %>;<%
  2552. if ( ( SHOWING_PLUGINS = dwDisplayMode ) and ( FALSE = bCheckedAnItem ) ) then %>
  2553.     <% jsTRY %>
  2554.         if( document.mainForm.plugins && ( document.mainForm.plugins[ 0 ] ) )
  2555.         {
  2556.             document.mainForm.plugins[ 0 ].checked = true;
  2557.             document.mainForm.plugins[ 0 ].onclick();
  2558.         }
  2559.     <% jsCATCH %>
  2560. <%
  2561. end if %>
  2562. }
  2563. </script>
  2564. </html>
  2565. <% 
  2566. LatchCurrentPage "server_props.asp", qs
  2567. EndErrorHandling "server_props.asp" 
  2568.  
  2569. on error resume next
  2570. objPluginCollection = nothing
  2571. objServerLimits = nothing
  2572. WMSServerHashASPCleanup
  2573. WMSConnectASPCleanup
  2574. %>
  2575.